lemonldap-ng/consul/config/service-intentions/lemonldap-ng.hcl

31 lines
651 B
HCL

Kind = "service-intentions"
Name = "[[ .instance ]][[ .consul.suffix ]]"
Sources = [
{
Name = "[[ (merge .llng.portal .).traefik.instance ]]"
Permissions = [
[[- if not .llng.api.traefik.enabled ]]
# Prevent access to the API as it's disabled
{
Action = "deny"
HTTP {
PathRegex = "^/index\\.psgi/(config|sessions)"
}
},
[[- end ]]
{
Action = "deny"
HTTP {
PathRegex = "^/reload"
}
},
{
Action = "allow"
HTTP {
Methods = ["GET", "HEAD", "POST", "OPTIONS", "PUT", "DELETE", "PATCH"]
}
}
]
}
]