Made max upload size specific to location

This commit is contained in:
Alejandro Angulo 2023-10-08 08:21:15 -07:00
parent 9a13503140
commit 7e87dbc55b
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6

View file

@ -26,12 +26,14 @@ in {
services.nginx = { services.nginx = {
enable = true; enable = true;
recommendedProxySettings = true; recommendedProxySettings = true;
clientMaxBodySize = "32m";
virtualHosts."octoprint.kilonull.com" = virtualHosts."octoprint.kilonull.com" =
{ {
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.octoprint.port}"; proxyPass = "http://127.0.0.1:${toString config.services.octoprint.port}";
proxyWebsockets = true; proxyWebsockets = true;
extraConfig = ''
client_max_body_size 32m;
'';
}; };
} }
// lib.optionalAttrs (cfg.acmeCertName != "") { // lib.optionalAttrs (cfg.acmeCertName != "") {