Routes with trailing slash #1592
ronaldogmartins
started this conversation in
General
Replies: 1 comment 1 reply
-
so for me, what I had to do was to add this to the app.module.ts file, I hope this helps:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I created an Angular 12 project with scully v2.1.32 and it was working on the server, using docker and nginx to serve.
However, when performing a performance test, there was always routing (301) of the route, related to trailing slash.
I followed the recommendations of:
https://www.c-sharpcorner.com/article/angular-7-routing-with-preserving-trailing-slash-in-url/
That is, I changed all routes in Angular to "xxxx/." and insert the Location.stripTrailingSlash function as indicated in the article above.
The solution worked normally in tests on localhost, with the routes appearing in the browser ending with "/" (localhost:1668/xxxx/).
But when running "RUN npm run scully" in docker, appears the message
. "Route '/passeios/seleciona_regiao/.' not provided by angular app", and then a fatal error in a postProcessByHtml plugin.
Can anyone give me a tip on how to solve the situation or point me to another solution regarding trailing slash?
Installation in docker is using node:14.19.1-alpine and running:
RUN apk add --no-cache
chromium
nss
freetype
freetype-dev
harfbuzz
ca-certificates
ttf-freefont
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV SCULLY_PUPPETEER_EXECUTABLE_PATH /usr/bin/chromium-browser
Thanks
Beta Was this translation helpful? Give feedback.
All reactions