diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2021-02-14 09:16:10 -0500 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2021-02-14 09:19:04 -0500 |
| commit | 796bb82e8f5600416f9567eada0bd07f4e3790ce (patch) | |
| tree | c0ec2653d8d2e078445a639a743bf1327b02c202 /nginx | |
| parent | 8ffaf9d646265976fca6329d02391f4238abed9f (diff) | |
fix broken double slash redirect
nginx doesn't sanitize input to statements like return.
Diffstat (limited to 'nginx')
| -rw-r--r-- | nginx/nginx.conf | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 2823e65e..694ac76f 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -116,8 +116,8 @@ http { return 301 /$1; } - if ($request_uri ~ "//") { - return 301 $uri$is_args$args; + if ($request_uri ~ (.*)//(.*)) { + return 301 $1/$2; } location = /security.txt { |
