-
Notifications
You must be signed in to change notification settings - Fork 141
duplicate query parameters #205
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
Comments
Thank you for your report @katrinaaquino1 I will investigate this one this week |
Hi @katrinaaquino1 I discovered the source of the bug and have a PR up to fix it here #209 Would you be able to give it a test with your use case before I merge it? There are not any images pushed at the moment but if you have the ability to build and test it against your use case it would be appreciated. |
@4141done This fix works for my use case. Thanks! |
…IRECTORY would cause duplication of the query string (#209) # What As reported here #205 when * `APPEND_SLASH_FOR_POSSIBLE_DIRECTORY=true` * `ALLOW_DIRECTORY_LIST=false` * `PROVIDE_INDEX_PAGE=true` Are set, requests containing query strings without a trailing slash were being duplicated (`foo?a=b` were becoming `foo?a=b?a=b`). ## Cause The `rewrite` directive will automatically append the query string unless a final trailing `?` is supplied. This was causing the duplication ## Fix Added an explanatory comment and a trailing `?` to the rewrite rule to prevent automatic appending of the query string as we already do it in the argument to the rewrite rule. I chose to do this rather than depending on the default behavior of `rewrite` since the rule as it is expressed is more explicit. The trailing `?` is mysterious and so a comment was included to clarify.
@katrinaaquino1 Thank you again for reporting this bug. The fix has been merged and new versions of the docker image with the fix are available on github packages and docker hub. Sorry for any inconvenience it may have caused 🙏 Please feel free to reopen this issue of the problem persists. |
Describe the bug
An extra set of query parameters is added to the URL
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The index.html page loads and the URL remains /test?a=asd or updates to /test/?a=asd
Your environment
Using the most recent version of the master branch - 0cdacac
Running the container using the included Dockerfile.oss file on localhost
Using AWS S3 as a backend
Additional context
I noticed the duplication only happens when navigating to /test?a=asd, but not /test/?a=asd or /test/index.html?a=asd
The text was updated successfully, but these errors were encountered: