Skip to content

Commit

Permalink
updated fake IP that caddy is ok with
Browse files Browse the repository at this point in the history
  • Loading branch information
traceypooh committed Jan 10, 2025
1 parent d28337e commit 3239786
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV REVERSE_PROXY ""
ENV ON_DEMAND_TLS_ASK ""
ENV ALLOWED_REMOTE_IPS_CONTROL_PLANE ""
ENV ALLOWED_REMOTE_IPS_SERVICES ""
ENV ALLOWED_REMOTE_IPS_HTTP "333.333.333.333"
ENV ALLOWED_REMOTE_IPS_HTTP "255.255.255.255"
ENV HOST_UNAME Linux

# replaced at runtime:
Expand Down
4 changes: 2 additions & 2 deletions etc/Caddyfile.ctmpl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ https://{{ $hosty }} {
# https://av.dev.archive.org:5432

# NOTE: `trusted_proxies` is for `X-Forwarded-Host` header from something like nginx `proxy_pass`
# NOTE: 666.666.666.666 below is a fake IP that allows an external managment process (eg: a cron)
# NOTE: 255.255.255.255 below is a fake IP that allows an external managment process (eg: a cron)
# to update perl/sed replace append IPs to that value dynamically if needed
# (eg: changing list of IP addresses)
{{ range services -}}
Expand All @@ -104,7 +104,7 @@ https://{{ $hosty }} {

{{- $origin }} {
{{ if ne (env "ALLOWED_REMOTE_IPS_SERVICES") "" }}
@blocked not remote_ip {{ env "ALLOWED_REMOTE_IPS_SERVICES" }} 666.666.666.666
@blocked not remote_ip {{ env "ALLOWED_REMOTE_IPS_SERVICES" }} 255.255.255.255
respond @blocked Forbidden 403
{{ end }}

Expand Down

0 comments on commit 3239786

Please sign in to comment.