caddy/caddyhttp/rewrite
AndreKR 4bad5c79be Simple rewrite regex captures (#2592)
* More informative rewrite test output

When running rewrite tests, the output in case of a test failure now
includes not only the rewritten URLs but also the from URL.

* Move re-escaping to regexpMatches

This commit moves the code to post-process the match replacements from
ComplexRule to regexpMatches, so it can later be re-used for SimpleRule.

Also changes the comment in an attempt to better explain the reasoning
behind that code.

The required strings.Replacer is now built only once.

* Support regex captures in simple rewrite rules

Closes #2586
2019-05-24 12:00:27 -06:00
..
testdata Migrating more middleware packages 2016-06-05 21:51:56 -06:00
rewrite_test.go Simple rewrite regex captures (#2592) 2019-05-24 12:00:27 -06:00
rewrite.go Simple rewrite regex captures (#2592) 2019-05-24 12:00:27 -06:00
setup_test.go rewrite: Regular expression support for simple rule (#2082) 2018-04-14 19:40:55 -06:00
setup.go rewrite: Regular expression support for simple rule (#2082) 2018-04-14 19:40:55 -06:00
to_test.go Apply Apache license to all .go source files (closes #1865) 2017-09-22 23:56:58 -06:00
to.go Apply Apache license to all .go source files (closes #1865) 2017-09-22 23:56:58 -06:00