-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime placeholders for selected TLS and HTTP matchers #6480
Conversation
- remove IPs validation in UnmarshalCaddyfile
- add placeholder replacement for IPs in Provision
- add placeholder replacement for other strings
- add placeholder replacement for IPs in Provision
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the caddy.Context
available in Provision
contains a replacer already, and it may have some values set already. Try using the existing replacer.
So did I think, but I checked the context, and it's basically empty at provision. I use the existing replacer at match. |
- move PrivateRandesCIDR under internal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM. Nice idea to move the PrivateRangesCIDR function into an internal package.
…r (e.g. in TestDefaultSNI)
This PR follows mholt/caddy-l4#224 and deals with the following mainline matchers only:
These changes allow to use runtime placeholders with TLS and HTTP IP matchers, e.g.
remote_ip {env.VAR}
. Such placeholders, if present, are evaluated once at provision due to the existing optimisations.In addition, this PR adds runtime placeholders support for TLS SNI matcher, e.g.
sni {env.VAR}
. Contrary to the above, such placeholders are evaluated each time at match.