feat: trusted ips #128

Merged
p4u1 merged 2 commits from forwarded-headers into master 2026-09-01 13:11:01 +00:00
3 changed files with 13 additions and 1 deletions
+8
View File
1
@@ -235,3 +235,11 @@ WRITE_TIMEOUT=0s
## Access logs
#COMPOSE_FILE="$COMPOSE_FILE:compose.access-log.yml"
## Behind a reverse proxy
#
p4u1 marked this conversation as resolved Outdated
Outdated
Review

Could you add an example and / or link to traefik docs

Could you add an example and / or link to traefik docs
Outdated
Review

added more context, let me know if it's ok

added more context, let me know if it's ok
Outdated
Review

If you could add a small heading like above with access logs its perfect :)

If you could add a small heading like above with access logs its perfect :)
Outdated
Review

done!

done!
# YAML array of subnets from which Traefik's trusts the x-real-ip
# header when behind a reverse proxy.
#
# https://doc.traefik.io/traefik/reference/install-configuration/entrypoints/#opt-forwardedHeaders-trustedIPs
#TRUSTED_IPS="['10.13.12.1']" # 10.13.12.1 is an example
+1 -1
View File
@@ -1,4 +1,4 @@
export TRAEFIK_YML_VERSION=v33
export TRAEFIK_YML_VERSION=v34
fauno marked this conversation as resolved Outdated
Outdated
Review

Needs bump to 33, but nice to see others adopting my dirty hacks 😄

Needs bump to 33, but nice to see others adopting my dirty hacks 😄
Outdated
Review

@p4u1 do i bump it to 34 now?

@p4u1 do i bump it to 34 now?
Outdated
Review

Yes please

Yes please
export FILE_PROVIDER_YML_VERSION=v12
export ENTRYPOINT_VERSION=v5
export ANUBIS_YML_VERSION=v1
+4
View File
@@ -48,6 +48,10 @@ entrypoints:
to: web-secure
web-secure:
address: ":443"
{{ if ne (env "TRUSTED_IPS") "" }}
forwardedHeaders:
trustedIPs: {{ env "TRUSTED_IPS" }}
{{ end }}
transport:
respondingTimeouts:
readTimeout: {{ env "READ_TIMEOUT" }}