summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/reverseproxy
AgeCommit message (Collapse)Author
2019-12-12Minor improvements; comments and shorter placeholders & module IDsMatthew Holt
2019-12-10v2: Module documentation; refactor LoadModule(); new caddy struct tags (#2924)Matt Holt
This commit goes a long way toward making automated documentation of Caddy config and Caddy modules possible. It's a broad, sweeping change, but mostly internal. It allows us to automatically generate docs for all Caddy modules (including future third-party ones) and make them viewable on a web page; it also doubles as godoc comments. As such, this commit makes significant progress in migrating the docs from our temporary wiki page toward our new website which is still under construction. With this change, all host modules will use ctx.LoadModule() and pass in both the struct pointer and the field name as a string. This allows the reflect package to read the struct tag from that field so that it can get the necessary information like the module namespace and the inline key. This has the nice side-effect of unifying the code and documentation. It also simplifies module loading, and handles several variations on field types for raw module fields (i.e. variations on json.RawMessage, such as arrays and maps). I also renamed ModuleInfo.Name -> ModuleInfo.ID, to make it clear that the ID is the "full name" which includes both the module namespace and the name. This clarity is helpful when describing module hierarchy. As of this change, Caddy modules are no longer an experimental design. I think the architecture is good enough to go forward.
2019-12-06Use "IsUnixNetwork" function instead of repeating the logicMatthew Holt
2019-12-04Fix misspellings (#2908)lu4p
2019-11-27reverse_proxy: Add flush_interval to caddyfile syntax (#1460)Matthew Holt
Also add godoc for Caddyfile syntax for file_server
2019-11-18reverse_proxy: Fix invalid argument to Intn in RandomChoice selectionMatthew Holt
2019-11-15reverse_proxy: Allow buffering of client requestsMatthew Holt
This is a bad idea, but some backends apparently require it. See discussion in #176.
2019-11-15cmd: Disable admin endpoint for file-server and reverse-proxy commandsMatthew Holt
This makes it easier to use multiple instances on the same machine
2019-11-11core: Use port ranges to avoid OOM with bad inputs (#2859)Mohammed Al Sahaf
* fix OOM issue caught by fuzzing * use ParsedAddress as the struct name for the result of ParseNetworkAddress * simplify code using the ParsedAddress type * minor cleanups
2019-11-06reverse_proxy: Fix NTLM auth detectionMatthew Holt
D'oh. Got mixed up in a refactoring.
2019-11-05reverse_proxy: Add support for NTLMMatthew Holt
2019-11-05reverse_proxy: Make HTTP versions configurable, don't set NextProtosMatthew Holt
2019-11-04reverse_proxy: Add UnmarshalCaddyfile for random_choose selection policyMatthew Holt
Also allow caddy.Duration to be given integer values which are treated like regular time.Duration values (nanoseconds). Fixes #2856
2019-11-04reverse_proxy: Add port to upstream address if only implied in schemeMatthew Holt
2019-10-31reverse_proxy: Fix panic for some CLI flag values (closes #2848)Matthew Holt
2019-10-29reverse_proxy: Structured logsMatthew Holt
2019-10-29proxy: Forgot to commit importMatthew Holt
2019-10-29proxy: Enable HTTP/2 on transport to backendMatthew Holt
2019-10-28caddyhttp: Minor cleanup and fix nil pointer deref in caddyfile adapterMatthew 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-11reverse_proxy: optimize MaxIdleConnsPerHost default (#2809)yzongyue
2019-10-11reverse_proxy: Allow dynamic backends (closes #990 and #1539)Matthew Holt
This PR enables the use of placeholders in an upstream's Dial address. A Dial address must represent precisely one socket after replacements. See also #998 and #1639.
2019-10-10reverse_proxy: Customize SNI value in upstream request (closes #2483)Matthew Holt
2019-10-10Miscellaneous cleanups / commentsMatthew Holt
2019-10-09reverse_proxy: Add local circuit breakerMatthew Holt
This migrates a feature that was previously reserved for enterprise users, according to https://github.com/caddyserver/caddy/issues/2786. The local circuit breaker is a simple metrics counter that can cause the reverse proxy to consider a backend unhealthy before it actually goes offline, by measuring recent latencies over a sliding window. Credit to Danny Navarro
2019-10-05reverse_proxy: Implement retry_match; by default only retry GET requestsMatthew Holt
See https://caddy.community/t/http-proxy-and-non-get-retries/6304
2019-10-04reverse_proxy: Configurable request headers on active health checksMatthew Holt
See https://caddy.community/t/health-check-user-agent/6309
2019-10-03Add file-server and reverse-proxy subcommandsMatthew Holt
2019-09-20reverse_proxy/headers: Expose header replacement ability in CaddyfileMatthew Holt
Adds header_up and header_down subdirectives to reverse_proxy
2019-09-17fastcgi: Implement / redirect for index.php with php_fastcgi directive (#2754)Matt Holt
* fastcgi: Implement / redirect for index.php with php_fastcgi directive See #2752 and https://caddy.community/t/v2-redirect-path-to-path-index-php-with-assets/6196?u=matt * caddyhttp: MatchNegate implements json.Marshaler * fastcgi: Add /index.php element to try_files matcher * fastcgi: Make /index.php redirect permanent
2019-09-14reverse_proxy: Close idle connections on module unloadMatthew Holt
2019-09-14Eliminate some TODOsMatthew Holt
2019-09-14reverse_proxy: Ability to mutate headers; set upstream placeholdersMatthew Holt
2019-09-11reverseproxy: Fix host and port on requests; fix Caddyfile parserMatthew Holt
2019-09-11reverseproxy: Add 'tls' option to enable HTTPS with HTTP transportMatthew Holt
2019-09-10caddyfile: Improve Dispenser.NextBlock() to support nestingMatthew Holt
2019-09-10New 'php_fastcgi' directive for convenient PHP+FastCGI reverse proxyMatthew Holt
2019-09-10fastcgi: Make EnvVars a map instead of a sliceMatthew Holt
2019-09-09Migrate some selection policy tests over to v2Matthew Holt
2019-09-09reverse_proxy: Caddyfile integration (and fix blocks in Dispenser)Matthew Holt
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-09-06fastcgi: Use request context as base, not a new oneMatthew Holt
2019-09-05fastcgi: Set default root path; add interface guardsMatthew Holt
2019-09-05Add original URI to request context; implement into fastcgi envMatthew Holt
2019-09-05Reconcile upstream dial addresses and request host/URL informationMatthew Holt
My goodness that was complicated Blessed be request.Context Sort of
2019-09-03reverse_proxy: Ignore context.Canceled errorsMatthew Holt
These happen when downstream clients cancel the request, but that's not our problem nor a failure in our end
2019-09-03Integrate circuit breaker modules with reverse proxyMatthew Holt
2019-09-03Some cleanup and godocMatthew Holt
2019-09-03reverse_proxy: Implement remaining TLS config for proxy to backendMatthew Holt
2019-09-03reverse_proxy: Implement active health checksMatthew Holt