Support sockets
This commit is contained in:
parent
959801a1d0
commit
d70eff7249
@ -25,6 +25,7 @@ in
|
||||
type = with types; attrsOf (submodule { options = {
|
||||
ip = mkOption { type = str; description = "IP address"; };
|
||||
port = mkOption { type = int; description = "Port number"; };
|
||||
socket = mkOption { type = str; description = "Emplacement du socket"; default = ""; };
|
||||
auth = mkOption { type = bool; description = "Enable authentification"; default = false; };
|
||||
}; });
|
||||
example = ''
|
||||
@ -90,7 +91,16 @@ in
|
||||
''
|
||||
backend ${name}-backend
|
||||
mode http
|
||||
${(
|
||||
if value.socket == "" then
|
||||
''
|
||||
server ${name} ${value.ip}:${toString value.port}
|
||||
''
|
||||
else
|
||||
''
|
||||
server ${name} ${value.socket}
|
||||
''
|
||||
)}
|
||||
${(if value.auth then (
|
||||
"\n acl AuthOK_LOUTRE http_auth(LOUTRE)\n"
|
||||
+ " http-request auth realm LOUTRE if !AuthOK_LOUTRE\n"
|
||||
|
Loading…
Reference in New Issue
Block a user