Closed
Description
Hi,
The following host config fragment only works with the IP addresses listed in the first client_ip
. Subsequent client_ip
are denied access on Caddy 2.8.0:
@webhook {
path "/webhook"
not {
# prod servers
client_ip 51.138.37.238 20.54.89.16 13.80.70.181 13.80.71.223 13.79.28.70 40.127.253.112/28 51.105.129.192/28
# demo servers
client_ip 20.50.240.57 40.74.20.78 94.70.170.65 94.70.174.36 94.70.255.73 94.70.248.18 83.235.24.226 20.13.195.185
# our own connection for debug purposes
client_ip 1.2.3.4
}
}
handle @webhook {
abort
}
It used to work with remote_ip
:
@webhook {
path "/webhook"
not {
# prod servers
remote_ip forwarded 51.138.37.238 20.54.89.16 13.80.70.181 13.80.71.223 13.79.28.70 40.127.253.112/28 51.105.129.192/28
# demo servers
remote_ip 20.50.240.57 40.74.20.78 94.70.170.65 94.70.174.36 94.70.255.73 94.70.248.18 83.235.24.226 20.13.195.185
# our own connection for debug purposes
remote_ip 1.2.3.4
}
}
handle @webhook {
abort
}
Moving client_ip 1.2.3.4
to the first line of the not
expression allows that IP address but not the others.
Trusted proxies are set:
{
servers {
trusted_proxies static 173.245.48.0/20 103.21.244.0/22 103.22.200.0/22 103.31.4.0/22 141.101.64.0/18
}
}
Is there some way around this?
Metadata
Metadata
Assignees
Labels
No labels