From 2766f272fc80f5613a161b9bf6c64aa7d3eb961b Mon Sep 17 00:00:00 2001 From: stuebinm Date: Wed, 8 Sep 2021 16:55:27 +0200 Subject: fix exneuland proxying --- hosts/chaski/services/exneuland.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'hosts') diff --git a/hosts/chaski/services/exneuland.nix b/hosts/chaski/services/exneuland.nix index a0c765a..3ec3451 100644 --- a/hosts/chaski/services/exneuland.nix +++ b/hosts/chaski/services/exneuland.nix @@ -20,7 +20,7 @@ in { services.nginx = { enable = true; - recommendedProxySettings = true; + recommendedProxySettings = false; virtualHosts."exneuland.stuebinm.eu" = { root = "${frontdrv}/dist"; locations."/_/".tryFiles = "/index.html =404"; @@ -30,6 +30,14 @@ in proxyWebsockets = true; extraConfig = '' add_header Access-Control-Allow-Origin https://exneuland.stuebinm.eu; + proxy_pass_request_headers on; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $http_host; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $http_connection; ''; }; -- cgit v1.2.3