diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index 9523cbb..a2c85c9 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -227,6 +227,31 @@ forceSSL = false; addSSL = true; locations = { + "/sods/" = { + extraConfig = '' +# allow large file uploads + client_max_body_size 50000M; + +# Set headers + 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-Prefix sods; + +# enable websockets: http://nginx.org/en/docs/http/websocket.html + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_redirect off; + +# set timeout + proxy_read_timeout 600s; + proxy_send_timeout 600s; + send_timeout 600s; + ''; + proxyPass = "http://127.0.0.1:2000/"; + }; "/" = { extraConfig = '' # allow large file uploads