* 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
Caddy can be built, even with plugins, without modifying the source
code and without special build scripts, thanks to Go modules. See
the README or wiki.
* Set up CI with Azure Pipelines [skip ci]
* Add other platforms [skip ci]
* Oops, add vmImage back in [skip ci]
* Fix goVersion [skip ci]
* Use sudo to install Go [skip ci]
* Attempt platform-specific Go isntalls [skip ci]
* Try sharing the variable a different way [skip ci]
* Trying this again... [skip ci]
* Fix the PATH [skip ci]
* Fix GOROOT, hopefully [skip ci]
* More fixing [skip ci]
* Still fixing [skip ci]
* Add golang-ci [skip ci]
* asdfasdfasf [skip ci]
* Sigh, work around broken golangci-lint installer [skip ci]
* Try again [skip ci]
* ahhhhhh [skip ci]
* sooooo close! cleanup [skip ci]
* oh c'mon [skip ci]
* thought I had it for a sec [skip ci]
* yaaaayyyy [skip ci]
ship it
* Add upstream header replacements (TODO: tests, docs)
* Add tests, fix a few bugs
* Add more tests and comments
* Refactor header_upstream to use a fallthrough; return regex errors
* Move SiteOutput to a seperate function sorted by port.
* Rename vars and tidy up
* Move loopback note to output loop
* Fix Typo
* Remove unneeded var
* Readability Change
* Change to other port string.
* Simplify as all sites in Server use the same port
* Ensure -quiet supresses fmt.Println calls
* Prevent double output of siteinfo to log - improve log message
* change name of log in comment
* Remove spaces
* Remove extra line output
* final tidy!
* Use caddy.LogDestination to setup log
* Ensure Log is still output if quiet.
* Correct case of functions and make function param bool
* Remove conditional check for LogDestination
* Revert output to simple blocks
* comment update
* Move SiteOutput to a seperate function.
* Simplify as all sites in Server use the same port
* Ensure -quiet supresses fmt.Println calls
* Prevent double output of siteinfo to log - improve log message
* Use caddy.LogDestination to setup log
* Ensure Log is still output if quiet.