Matthew Holt
55b4c12e04
map: Evaluate placeholders in output vals ( #4650 )
3 years ago
Francis Lavoie
c5fffb4ac2
caddyfile: Support for raw token values; improve `map`, `expression` ( #4643 )
* caddyfile: Support for raw token values, improve `map`, `expression`
* Applied code review comments
* Rename RawVal to ValRaw
Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
3 years ago
Matthew Holt
93c99f6734
map: Support numeric and bool types with Caddyfile
Based on caddyserver/website#221
3 years ago
Matthew Holt
a2119c09e9
map: Fix 95c03506
(avoid repeated expansions)
3 years ago
Matthew Holt
95c035060f
map: Fix regex mappings
It didn't really make sense how we were doing them before. See https://caddy.community/t/map-directive-and-regular-expressions/13866/6?u=matt
3 years ago
Rajat Jain
802f80c382
map: Accept regex substitution in outputs ( #3991 )
* Replace placeholders with regex groups
* using Matcher methods
* test added
* linting fix
* Revert "linting fix"
This reverts commit cafd7296f43639bbcd2601bea79a47f60763a200.
* Revert "test added"
This reverts commit 3a76cc7b0bc5dcef15ca5c8ec22efcd4067d484c.
* Revert "using Matcher methods"
This reverts commit cc34337b8ebb61d40ec343cee0fc225a694d3db6.
* tests added
4 years ago
Matthew Holt
58e83a811b
map: Add missing json struct tag
4 years ago
Matthew Holt
ef8a372a1c
map: Bug fixes; null literal with hyphen in Caddyfile
4 years ago
Matthew Holt
0fc47e8357
map: Apply default if mapped output is nil
4 years ago
Matthew Holt
25d2b4bf29
map: Reimplement; multiple outputs; optimize
4 years ago
Mark Sargent
6004d3f779
caddyhttp: Add 'map' handler ( #3199 )
* inital map implementation
* resolve the value during middleware execution
* use regex instead
* pr feedback
* renamed mmap to maphandler
* refactored GetString implementation
* fixed mispelling
* additional feedback
5 years ago