feat: elaborate nginx options

This commit is contained in:
Constantin Gierczak--Galle 2024-11-03 16:58:05 +01:00
parent 1b13296783
commit 59d9b333d1
No known key found for this signature in database
2 changed files with 16 additions and 3 deletions

View file

@ -62,7 +62,6 @@ in
}; };
}; };
# NOTE: for now, we use internal ports
# TODO: switch to unixsockets if supported # TODO: switch to unixsockets if supported
services.nginx = { services.nginx = {
enable = true; enable = true;

View file

@ -43,6 +43,20 @@
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
serverAliases = []; serverAliases = [];
locations."/".proxyPass = "http://localhost:2342/"; recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
clientMaxBodySize = "500m";
locations."/" = {
proxyPass = "http://localhost:2342/";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_buffering off;
proxy_http_version 1.1;
'';
};
}; };
} }