diff --git a/modules/homelab/services/gitea/default.nix b/modules/homelab/services/gitea/default.nix index eb5c68f..cf69749 100644 --- a/modules/homelab/services/gitea/default.nix +++ b/modules/homelab/services/gitea/default.nix @@ -97,15 +97,15 @@ in sslCertificateKey = sec."ssl_blakedheld_key".path; locations."/" = { proxyPass = "http://127.0.0.1:${toString cfg.port}"; - extraConfig = - "client_max_body_size 512M;" + - "proxy_set_header Connection $http_connection;" + - "proxy_set_header Upgrade $http_upgrade;" + - "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;" - ; + extraConfig = '' + client_max_body_size 512M; + proxy_set_header Connection $http_connection; + proxy_set_header Upgrade $http_upgrade; + 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; + ''; }; }; # external reverse proxy entry @@ -114,15 +114,15 @@ in forceSSL = true; locations."/" = { proxyPass = "http://127.0.0.1:${toString cfg.port}"; - extraConfig = - "client_max_body_size 512M;" + - "proxy_set_header Connection $http_connection;" + - "proxy_set_header Upgrade $http_upgrade;" + - "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;" - ; + extraConfig = '' + client_max_body_size 512M; + proxy_set_header Connection $http_connection; + proxy_set_header Upgrade $http_upgrade; + 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; + ''; }; };