caddy/modules/caddyhttp
Zongze Wu bbf1dfcea2
headers: Support placeholders in replacement search patterns (#7117)
* fix: resolve http.request placeholders in header directive find operation

- Skip regex compilation during provision when placeholders are detected
- Compile regex at runtime after placeholder replacement
- Preserves performance for static regexes while enabling dynamic placeholders
- Fixes #7109

* test: add tests for placeholder detection in header replacements

- Test containsPlaceholders function edge cases
- Test provision skips compilation for dynamic regexes
- Test end-to-end placeholder replacement functionality
2025-07-14 14:55:00 -06:00
..
caddyauth Use the built-in max/min to simplify the code (#7081) 2025-06-19 16:39:48 -06:00
encode
…
fileserver refactor: replace HasPrefix+TrimPrefix with CutPrefix (#7095) 2025-06-27 22:04:09 +03:00
headers headers: Support placeholders in replacement search patterns (#7117) 2025-07-14 14:55:00 -06:00
intercept
…
logging
…
map
…
proxyprotocol
…
push
…
requestbody
…
reverseproxy reverseproxy: validate versions in http transport (#7112) 2025-07-09 14:13:27 -06:00
rewrite chore: upgrade .golangci.yml and workflow to v2 (#6924) 2025-06-03 02:24:32 +03:00
standard
…
templates chore: fix function in comment (#7121) 2025-07-12 11:54:57 +00:00
tracing
…
app.go
…
autohttps.go chore: upgrade .golangci.yml and workflow to v2 (#6924) 2025-06-03 02:24:32 +03:00
caddyhttp.go
…
caddyhttp_test.go
…
celmatcher.go
…
celmatcher_test.go
…
errors.go
…
http2listener.go
…
httpredirectlistener.go
…
invoke.go
…
ip_matchers.go
…
ip_range.go
…
logging.go
…
marshalers.go
…
matchers.go chore: fix function in comment (#7121) 2025-07-12 11:54:57 +00:00
matchers_test.go
…
metrics.go
…
metrics_test.go chore: upgrade .golangci.yml and workflow to v2 (#6924) 2025-06-03 02:24:32 +03:00
replacer.go chore: upgrade .golangci.yml and workflow to v2 (#6924) 2025-06-03 02:24:32 +03:00
replacer_test.go
…
responsematchers.go
…
responsematchers_test.go
…
responsewriter.go
…
responsewriter_test.go
…
routes.go
…
server.go
…
server_test.go chore: upgrade .golangci.yml and workflow to v2 (#6924) 2025-06-03 02:24:32 +03:00
staticerror.go
…
staticresp.go
…
staticresp_test.go
…
subroute.go
…
vars.go
…