summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2021-06-07 12:57:33 -0400
committerDaniel Micay <danielmicay@gmail.com>2021-06-07 12:57:33 -0400
commitd0e54474fe6a870fb6d70c229c806d561d991232 (patch)
tree99e8d9090af1dbc85fe01e9466b4f08f481f3b25
parenta8c76c467009fb02ce58003370e230ac2c518b64 (diff)
convert if back into location block
-rw-r--r--nginx/nginx.conf10
1 files changed, 5 insertions, 5 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
index ae58688e..385781db 100644
--- a/nginx/nginx.conf
+++ b/nginx/nginx.conf
@@ -137,11 +137,6 @@ http {
return 301 $1/$2;
}
- # https://www.twipu.com/GrapheneOS doesn't handle links with fragments properly
- if ($request_uri ~ "^/(.*)%3Ca%20href=$") {
- return 301 /$1;
- }
-
location = /security.txt {
return 301 /.well-known/security.txt;
}
@@ -309,6 +304,11 @@ http {
return 301 /favicon.svg;
}
+ # https://www.twipu.com/GrapheneOS doesn't handle links with fragments properly
+ location ~ "^/([^\s]*)%3Ca%20href=$" {
+ return 301 /$1;
+ }
+
location ~ "(/index|\.(br|gz|html))$" {
internal;
}