mirror of https://gitlab.crans.org/nounous/nixos
add proxyWebsockets option
parent
0297fbc472
commit
4d021eedff
|
@ -155,6 +155,7 @@ in {
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
"collabora" = {
|
"collabora" = {
|
||||||
target = "172.16.10.149";
|
target = "172.16.10.149";
|
||||||
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
"eclat" = {
|
"eclat" = {
|
||||||
anubisConfig = "${anubisMirror}";
|
anubisConfig = "${anubisMirror}";
|
||||||
|
|
|
@ -75,6 +75,15 @@ in
|
||||||
'';
|
'';
|
||||||
example = "true";
|
example = "true";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
proxyWebSockets = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Activer les websockets
|
||||||
|
'';
|
||||||
|
example = "true";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -135,6 +144,7 @@ in
|
||||||
locations = mkIf ((substring 0 1 vhostConfig.target) != "/") {
|
locations = mkIf ((substring 0 1 vhostConfig.target) != "/") {
|
||||||
"/favicon.ico".root = "/var/www/logo/";
|
"/favicon.ico".root = "/var/www/logo/";
|
||||||
"/".proxyPass = "http://${vhostConfig.target}";
|
"/".proxyPass = "http://${vhostConfig.target}";
|
||||||
|
"/".proxyWebsockets = vhostConfig.proxyWebsockets;
|
||||||
};
|
};
|
||||||
root = mkIf ((substring 0 1 vhostConfig.target) == "/") vhostConfig.target;
|
root = mkIf ((substring 0 1 vhostConfig.target) == "/") vhostConfig.target;
|
||||||
listen = [
|
listen = [
|
||||||
|
@ -157,6 +167,7 @@ in
|
||||||
"${vhostName}.crans.eu"
|
"${vhostName}.crans.eu"
|
||||||
] ++ map (value: value.name + "." + value.domaine) aliases;
|
] ++ map (value: value.name + "." + value.domaine) aliases;
|
||||||
globalRedirect = "${vhostName}.crans.org";
|
globalRedirect = "${vhostName}.crans.org";
|
||||||
|
locations."/".proxyWebsockets = vhostConfig.proxyWebsockets;
|
||||||
}
|
}
|
||||||
) cfg.virtualHosts;
|
) cfg.virtualHosts;
|
||||||
anubisConfig = mapAttrs' (
|
anubisConfig = mapAttrs' (
|
||||||
|
@ -165,6 +176,7 @@ in
|
||||||
forceSSL = !vhostConfig.httpOnly;
|
forceSSL = !vhostConfig.httpOnly;
|
||||||
rejectSSL = vhostConfig.httpOnly;
|
rejectSSL = vhostConfig.httpOnly;
|
||||||
locations."/".proxyPass = "http://unix:/run/anubis/anubis-${vhostName}.sock";
|
locations."/".proxyPass = "http://unix:/run/anubis/anubis-${vhostName}.sock";
|
||||||
|
locations."/".proxyWebsockets = vhostConfig.proxyWebsockets;
|
||||||
serverName = "${vhostName}.crans.org";
|
serverName = "${vhostName}.crans.org";
|
||||||
}
|
}
|
||||||
) cfg.virtualHosts;
|
) cfg.virtualHosts;
|
||||||
|
|
Loading…
Reference in New Issue