Comments (3)
Ah whoops, my bad. It's a regression on the matcher parsing. I did a cleanup on code style and accidentally broke the merging.
For now you could write it like this:
client_ip \
# prod servers \
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 \
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 \
1.2.3.4
Kinda goofy, but basically just escaping the newlines to continue specifying more IP ranges on the next line.
I'll fix it for the next release though.
from caddy.
Thank you @francislavoie.
This seems to work too (if I'm not mistaken):
@webhook {
path "/webhook"
# prod servers
not 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
not 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
not remote_ip 1.2.3.4
}
from caddy.
Yeah that works too, as per https://caddyserver.com/docs/caddyfile/matchers#examples-4 having multiple not
in a row is like saying not remote_ip AND not remote_ip AND not remote_ip
.
from caddy.
Related Issues (20)
- Error: unrecognized config adapter: yaml HOT 1
- Snippets can't be imported in named routes
- Issue with Unrecognized DynamoDB Storage Module in Caddyfile HOT 1
- Auth User ID not resolved when forwarding as a custom header HOT 1
- Nested named route invocation undetected
- Caddy should reuse exist wildcard cert
- phpfastcgi should set SCRIPT_NAME to script + path HOT 1
- Use layer4 as a listener wrapper OR pipe layer4 connection to http FOR ocserv multiplexing HOT 5
- panic runtime error: invalid memory address or nil pointer dereference (v2.8.4) HOT 6
- can't disable IPv4/IPv6 for dynamic reverse proxy from Caddyfile HOT 3
- Fail when environment variables were expected but not provided HOT 3
- Issues signing up at caddy.community? HOT 3
- `trusted_proxies_strict` can't be defined in either `server` or `reverse_proxy` HOT 4
- reverse proxy to tcp4 address still connects on IPv6 HOT 9
- Reverse proxy upstream keepalive HOT 3
- Metrics of HTTPS servers do not seem to work reliably HOT 6
- Hostnames aren't being normalized to lowercase when managing certs HOT 2
- Feature Request: Add dynamic reference to host machines private IP address. HOT 4
- Q: Caddy routing strategy ? HOT 2
- Regarding CVE-2023-42366 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caddy.