1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/snserver_ynh.git synced 2024-09-03 20:26:22 +02:00

[autopatch] Fix Host and X-Forwarded-For header spoofing

This commit is contained in:
tituspijean 2023-07-05 00:46:19 +02:00 committed by YunoHost Bot
parent 39fd2611a6
commit 5133ede19e

View file

@ -2,7 +2,7 @@
location __PATH__/ { location __PATH__/ {
proxy_pass http://127.0.0.1:__PORT_API_GATEWAY__/; proxy_pass http://127.0.0.1:__PORT_API_GATEWAY__/;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Host $http_host; proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade; proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
@ -17,7 +17,7 @@ location = __PATH__/ {
location __PATH__/files/ { location __PATH__/files/ {
proxy_pass http://127.0.0.1:__PORT_FILES__/; proxy_pass http://127.0.0.1:__PORT_FILES__/;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Host $http_host; proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade; proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;