summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2023-02-09 10:12:20 -0500
committerDaniel Micay <danielmicay@gmail.com>2023-02-09 10:12:20 -0500
commit76cc4ae336940305715c34745e5d9aab4a9ef074 (patch)
tree308ee1a20b7d9e8b263fff313dca28fdb3c58525
parent763c17a058701bf52aadabd88734ed0a3ac77063 (diff)
avoid unnecessary ACME challenge redirects
-rw-r--r--nginx/nginx.conf28
1 files changed, 9 insertions, 19 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
index bed723e2..d0a42d9c 100644
--- a/nginx/nginx.conf
+++ b/nginx/nginx.conf
@@ -129,12 +129,18 @@ http {
root /var/empty;
- return 301 https://$host$request_uri;
+ location /.well-known/acme-challenge/ {
+ return 301 http://0.grapheneos.org$request_uri;
+ }
+
+ location / {
+ return 301 https://$host$request_uri;
+ }
}
server {
- listen 443 ssl http2;
- listen [::]:443 ssl http2;
+ listen 80;
+ listen [::]:80;
server_name 0.grapheneos.org;
root /var/empty;
@@ -158,10 +164,6 @@ http {
include snippets/security-headers.conf;
add_header Cross-Origin-Resource-Policy "same-origin" always;
- location /.well-known/acme-challenge/ {
- return 301 https://0.grapheneos.org$request_uri;
- }
-
location / {
return 301 https://grapheneos.org$request_uri;
}
@@ -177,10 +179,6 @@ http {
include snippets/security-headers.conf;
add_header Cross-Origin-Resource-Policy "same-origin" always;
- location /.well-known/acme-challenge/ {
- return 301 https://0.grapheneos.org$request_uri;
- }
-
location / {
return 302 https://github.com/GrapheneOS/Vanadium;
}
@@ -407,10 +405,6 @@ http {
try_files $uri.html =404;
}
- location ^~ /.well-known/acme-challenge/ {
- return 301 https://0.grapheneos.org$request_uri;
- }
-
location ^~ /fonts/ {
include snippets/security-headers.conf;
add_header Cross-Origin-Resource-Policy "same-origin" always;
@@ -510,10 +504,6 @@ http {
location = /.well-known/mta-sts.txt {}
- location /.well-known/acme-challenge/ {
- return 301 https://0.grapheneos.org$request_uri;
- }
-
location / {
return 404;
}