summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/map
AgeCommit message (Collapse)Author
2022-09-29map: Remove infinite recursion check (#5094)Matt Holt
It was not accurate. Placeholders could be used in outputs that are defined in the same mapping as long as that placeholder does not do the same. A more general solution would be to detect it at run-time in the replacer directly, but that's a bit tedious and will require allocations I think. A better implementation of this check could still be done, but I don't know if it would always be accurate. Could be a "best-effort" thing? But I've also never heard of an actual case where someone configured infinite recursion...
2022-09-28caddyhttp: replace placeholders in map defaults (#5081)Will Norris
This updates the map directive to replace placeholders in default values in the same way as matched values.
2022-09-01map: Coerce val to string, fix #4987Matthew Holt
Also prevent infinite recursion, and enforce placeholder syntax.
2022-08-02chore: Bump up to Go 1.19, minimum 1.18 (#4925)Francis Lavoie
2022-05-06map: Prevent output destinations overlap with Caddyfile shorthands (#4657)Francis Lavoie
2022-03-21map: Evaluate placeholders in output vals (#4650)Matthew Holt
2022-03-18caddyfile: Support for raw token values; improve `map`, `expression` (#4643)Francis Lavoie
* 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>
2022-03-17map: Support numeric and bool types with CaddyfileMatthew Holt
Based on caddyserver/website#221
2021-10-19map: Fix 95c03506 (avoid repeated expansions)Matthew Holt
2021-10-13map: Fix regex mappingsMatthew Holt
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
2021-03-10map: Accept regex substitution in outputs (#3991)Rajat Jain
* 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
2021-01-16map: Add missing json struct tagMatthew Holt
2020-10-02map: Bug fixes; null literal with hyphen in CaddyfileMatthew Holt
2020-10-02map: Apply default if mapped output is nilMatthew Holt
2020-10-02map: Reimplement; multiple outputs; optimizeMatthew Holt
2020-06-26caddyhttp: Add 'map' handler (#3199)Mark Sargent
* 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