Add support for websockets

This commit is contained in:
muon 2025-01-27 21:30:11 +00:00
parent d52d63ea69
commit 5785a3bb84
2 changed files with 8 additions and 3 deletions

View file

@ -90,7 +90,12 @@ in with lib; {
enableACME = true;
};
proxy = port:
base { "/".proxyPass = "http://${cfg.ip}:${toString port}/"; };
base {
"/" = {
proxyPass = "http://${cfg.ip}:${toString port}/";
proxyWebsockets = true;
};
};
in mapAttrs' (name: port:
nameValuePair ("${name}.${cfg.domain}")
# (proxy port // { default = true; })) cfg.ports;