diff options
author | Francis Lavoie <[email protected]> | 2024-10-02 08:34:04 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-02 06:34:04 -0600 |
commit | 792f1c7ed759b97ee6dc80246cf2de054c09a12f (patch) | |
tree | be3533923d2ba7dfb5a3fde75d440e1aa7463b88 /modules/caddyhttp/templates/templates.go | |
parent | c8adb1b553412253d5f166065635ab809d3eef33 (diff) | |
download | caddy-792f1c7ed759b97ee6dc80246cf2de054c09a12f.tar.gz caddy-792f1c7ed759b97ee6dc80246cf2de054c09a12f.zip |
caddyhttp: Escaping placeholders in CEL, add `vars` and `vars_regexp` (#6594)
* caddyhttp: Escaping placeholders in CEL
* Simplify some of the test cases
* Implement vars and vars_regexp in CEL
* dupl lint is dumb
* Better consts for the placeholder CEL shortcut
* Bump CEL version, register a few extensions
* Refactor s390x test script for readability
* Add retries for s390x to smooth over flakiness
* Switch to `ph` for the CEL shortcut (match it in templates cause why not)
Diffstat (limited to 'modules/caddyhttp/templates/templates.go')
-rw-r--r-- | modules/caddyhttp/templates/templates.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/caddyhttp/templates/templates.go b/modules/caddyhttp/templates/templates.go index 0eba4870f..eb6488659 100644 --- a/modules/caddyhttp/templates/templates.go +++ b/modules/caddyhttp/templates/templates.go @@ -81,6 +81,12 @@ func init() { // {{placeholder "http.error.status_code"}} // ``` // +// As a shortcut, `ph` is an alias for `placeholder`. +// +// ``` +// {{ph "http.request.method"}} +// ``` +// // ##### `.Host` // // Returns the hostname portion (no port) of the Host header of the HTTP request. |