-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix infinite redirection when path root contains query params #203
Fix infinite redirection when path root contains query params #203
Conversation
@@ -108,15 +108,10 @@ services: | |||
) | |||
- "traefik.http.routers.traefik-redirect.priority=10" | |||
- "traefik.http.routers.traefik-redirect.middlewares=add-trailing-slash@docker" | |||
- "traefik.http.middlewares.add-trailing-slash.redirectregex.regex=^https?://(.*)/(.+)" | |||
- "traefik.http.middlewares.add-trailing-slash.redirectregex.regex=^https?://^[^?]+$/(.+)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…when_path_contains_query_param
I have tested this and it works, but I think the regex is misleading. Something like that would be clearer IMO:
Here we add a third capturing group containing query params, which we reappend after the trailing slash. What do you think @marwanehcine? |
can you please continue this PR here : #197 |
* rebase from #168 * update traefik redirection rules
* rebase from #168 * update traefik redirection rules
* rebase from #168 * update traefik redirection rules
* rebase from #168 * update traefik redirection rules
to fix infinite redirection when path root contains query params, traefik redirection rules in docker-compose.override.yml has to be updated. A new regex formula is used to check is query param exist or not