Add Host header and replace . with \.

This commit is contained in:
Sam A. 2024-01-28 19:24:00 +01:00
parent 733b173594
commit 91dddb20f8
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
3 changed files with 4 additions and 1 deletions

View file

@ -17,7 +17,7 @@ server {
server {
listen 8080;
server_name ~^([\w-]+\.(ipfs|ipns)\.)?{{ apps_vars.ipfs.gateway_domain }}$;
server_name ~^([\w-]+\.(ipfs|ipns)\.)?{{ apps_vars.ipfs.gateway_domain | replace('.', '\.') }}$;
location / {
set $upstream http://ipfs:8080;
@ -26,5 +26,6 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto "https";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
}
}

View file

@ -12,5 +12,6 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto "https";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
}
}

View file

@ -12,6 +12,7 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto "https";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
# WebSocket support
proxy_http_version 1.1;