Skip to content

Commit

Permalink
fix: Solve an issue where rewrites due to APPEND_SLASH_FOR_POSSIBLE_D…
Browse files Browse the repository at this point in the history
…IRECTORY would cause duplication of the query string
  • Loading branch information
4141done committed Feb 7, 2024
1 parent f6dfdc9 commit 1bfb2bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/etc/nginx/templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@ server {

location @trailslash {
# 302 to request without slashes
rewrite ^ $scheme://$http_host$uri/$is_args$query_string redirect;
# Adding a ? to the end of the replacement param in `rewrite` prevents it from
# appending the query string.
rewrite ^ $scheme://$http_host$uri/$is_args$query_string? redirect;
}

# Provide a hint to the client on 405 errors of the acceptable request methods
Expand Down

0 comments on commit 1bfb2bf

Please sign in to comment.