Add a forward-proto middleware

This commit is contained in:
Daniel Berteaud 2024-01-28 23:17:09 +01:00
parent 0b161aa20a
commit 1c2d5667fa
3 changed files with 43 additions and 1 deletions

View File

@ -35,6 +35,18 @@ job "traefik" {
sidecar_service {
}
sidecar_task {
config {
args = [
"-c",
"${NOMAD_SECRETS_DIR}/envoy_bootstrap.json",
"-l",
"${meta.connect.log_level}",
"--concurrency",
"${meta.connect.proxy_concurrency}",
"--disable-hot-restart"
]
}
resources {
cpu = 50
memory = 64
@ -391,6 +403,28 @@ _EOF
gid = 100000
}
template {
data = <<_EOF
---
http:
middlewares:
forward-proto:
headers:
customRequestHeaders:
X-Fowarded-Proto: https
_EOF
destination = "secrets/config/proxy.yml"
change_mode = "noop"
perms = "0400"
uid = 105443
gid = 100000
}
resources {
cpu = 500
memory = 256

View File

@ -0,0 +1,8 @@
---
http:
middlewares:
forward-proto:
headers:
customRequestHeaders:
X-Fowarded-Proto: https

View File

@ -108,7 +108,7 @@ _EOF
}
# Dynamic file configuration
[[- range $file := coll.Slice "basicauth" "lemonldap" "certificates" "ip" "performance" "security" ]]
[[- range $file := coll.Slice "basicauth" "lemonldap" "certificates" "ip" "performance" "security" "proxy" ]]
template {
data =<<_EOF