refactor(nginx): websocket proxy settings

This commit is contained in:
arcnmx 2024-01-22 14:13:49 -08:00
parent a0bd07f898
commit ba7f32ddcb
4 changed files with 52 additions and 26 deletions

View file

@ -59,12 +59,10 @@ in {
'';
};
locations."/prox/api2/" = {
proxy.websocket.enable = true;
proxyPass = "${proxyPass}api2/";
extraConfig = ''
internal;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
'';
};
};
@ -73,6 +71,7 @@ in {
forceSSL = mkDefault true;
inherit sslCertificate sslCertificateKey;
locations."/" = {
proxy.websocket.enable = true;
inherit proxyPass;
};
};
@ -80,6 +79,7 @@ in {
local.enable = mkDefault true;
inherit sslCertificate sslCertificateKey;
locations."/" = {
proxy.websocket.enable = true;
inherit proxyPass;
};
};