websocket support
This commit is contained in:
parent
9297fbd655
commit
75efcec006
@ -44,6 +44,10 @@ let
|
||||
type = lib.types.bool;
|
||||
default = "${config.my.servers.${name}.hostName}" == config.my.mainServer;
|
||||
};
|
||||
enableSocket = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
proxy = locations: {
|
||||
inherit locations;
|
||||
@ -51,7 +55,14 @@ let
|
||||
enableACME = true;
|
||||
http2 = true;
|
||||
};
|
||||
proxyReverse = cfg: proxy { "/".proxyPass = "http://${cfg.ip}:${toString cfg.port}/"; };
|
||||
proxyReverse =
|
||||
cfg:
|
||||
proxy {
|
||||
"/" = {
|
||||
proxyPass = "http://${cfg.ip}:${toString cfg.port}/";
|
||||
proxyWebsockets = cfg.enableSocket;
|
||||
};
|
||||
};
|
||||
proxyReverseFix =
|
||||
cfg:
|
||||
let
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user