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