summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/replacer.go
AgeCommit message (Collapse)Author
2020-03-30Keep type information with placeholders until replacements happenMatthew Holt
2020-02-25Expose TLS placeholders (#2982)Cameron Moore
* caddytls: Add CipherSuiteName and ProtocolName functions The cipher_suites.go file is derived from a commit to the Go master branch that's slated for Go 1.14. Once Go 1.14 is released, this file can be removed. * caddyhttp: Use commonLogEmptyValue in common_log replacer * caddyhttp: Add TLS placeholders * caddytls: update unsupportedProtocols Don't export unsupportedProtocols and update its godoc to mention that it's used for logging only. * caddyhttp: simplify getRegTLSReplacement signature getRegTLSReplacement should receive a string instead of a pointer. * caddyhttp: Remove http.request.tls.client.cert replacer The previous behavior of printing the raw certificate bytes was ported from Caddy 1, but the usefulness of that approach is suspect. Remove the client cert replacer from v2 until a use case is presented. * caddyhttp: Use tls.CipherSuiteName from Go 1.14 Remove ported version of CipherSuiteName in the process.
2020-01-10http: Remove {...query_string} placeholder, in favor of {...query}Matthew Holt
I am not sure if the query_string one is necessary or useful yet. We can always add it later if needed.
2019-12-29Export Replacer and use concrete type instead of interfaceMatthew Holt
The interface was only making things difficult; a concrete pointer is probably best.
2019-12-17http: query and query_string placeholders should use RawQuery, probablyMatthew Holt
2019-12-12rewrite: query string enh.; substring replace; add tests (see #2891)Matthew Holt
2019-10-28v2: Logging! (#2831)Matt Holt
* logging: Initial implementation * logging: More encoder formats, better defaults * logging: Fix repetition bug with FilterEncoder; add more presets * logging: DiscardWriter; delete or no-op logs that discard their output * logging: Add http.handlers.log module; enhance Replacer methods The Replacer interface has new methods to customize how to handle empty or unrecognized placeholders. Closes #2815. * logging: Overhaul HTTP logging, fix bugs, improve filtering, etc. * logging: General cleanup, begin transitioning to using new loggers * Fixes after merge conflict
2019-10-14caddyhttp: host labels placeholders endianness from right->leftMatthew Holt
https://caddy.community/t/labeln-placeholder-endian-issue/5366 (I thought we had this before but it must have gotten lost somewhere)
2019-10-10Miscellaneous cleanups / commentsMatthew Holt
2019-10-10caddyhttp: Add RemoteAddr placeholders (#2801)Pascal
* Ignore build artifacts * Add RemoteAddr placeholders
2019-09-09Merge pull request #2737 from caddyserver/fastcgi (reverse proxy!)Matt Holt
v2: Refactor reverse proxy and add FastCGI support
2019-09-06Various fixes/tweaks to HTTP placeholder variables and file matchingMatthew Holt
- Rename http.var.* -> http.vars.* to be more consistent - Prefixing a path matcher with * now invokes simple suffix matching - Handlers and matchers that need a root path default to {http.vars.root} - Clean replacer output on the file matcher's file selection suffix
2019-08-27Add query_string to HTTP replacer and use it for try_filesMatthew Holt
2019-08-09Implement config adapters and beginning of Caddyfile adapterMatthew Holt
Along with several other changes, such as renaming caddyhttp.ServerRoute to caddyhttp.Route, exporting some types that were not exported before, and tweaking the caddytls TLS values to be more consistent. Notably, we also now disable automatic cert management for names which already have a cert (manually) loaded into the cache. These names no longer need to be specified in the "skip_certificates" field of the automatic HTTPS config, because they will be skipped automatically.
2019-07-16Performance improvements to Replacer implementation (placeholders) (#2674)Matt Holt
Closes #2673
2019-07-08Add path components to HTTP replacerMatthew Holt
2019-07-02go.mod: Append /v2 to module name; update all import pathsMatthew Holt
See https://github.com/golang/go/wiki/Modules#semantic-import-versioning
2019-06-30Add licenseMatthew Holt
2019-06-14Rename caddy2 -> caddyMatthew Holt
Removes the version from the package name
2019-06-04Change import paths to GitHub package namesMatthew Holt
2019-05-21Fix up matchers tests and take care of TODO in rewriteMatthew Holt
2019-05-20Implement rewrite middleware; fix middleware stack bugsMatthew Holt
2019-05-20Implement most of static file server; refactor and improve ReplacerMatthew Holt
2019-05-16Some minor updates, and get rid of OnLoad/OnUnloadMatthew Holt
2019-05-14Rename and export some types, other minor changesMatthew Holt
2019-05-10caddyhttp: Implement better HTTP matchers including regexp; add testsMatthew Holt
2019-05-07Rough implementation of auto HTTP->HTTPS redirectsMatthew Holt
Also added GracePeriod for server shutdowns
2019-05-04Begin implementing HTTP replacer and static responderMatthew Holt