Redirect loop with trailing slashes appended to end of query string
Hi,
I have encountered an issue that causes a redirect loop, and can confirm that it works as expected locally.
Given the following URL, https://www.example.com/example?query=example, I would expect it to redirect to https://www.example.com/example/?query=example when trailingSlash is enabled in next.config.js.
However, a redirect loop occurs, and trailing slashes gets appended to the end of the query string, like this: https://www.example.com/example?query=example////////////////////////////////////.
Versions Next: 13.4.17 (app directory) SST: 2.29.2 OpenNext: 2.2.3
Happy to provide more details if needed.
Thank you!
Should be fixed in the upcoming 2.2.4
@khuezy Great, thank you very much!
@leanderiversen can you try 2.2.4 to see if it's fixed.
@khuezy I'm using open-next as part of SST, so I'm restricted to the latest bundled version, unless there is a way of overriding it.
you can override the buildCommand on NextjsSite, npx [email protected] build
@khuezy I can confirm that the issue has been fixed. Thank you!
Fixed in 2.2.4