summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-11-29v2: fixes query matcher parsing (#2901)Mark Sargent
* fixes query matcher parsing * return correct argument error when parsing query matcher
2019-11-29http: Shorten regexp matcher placeholders; allow "=/" for simple matcherMatthew Holt
2019-11-28http: path matcher supports exact matching with = prefixMatthew Holt
2019-11-27http: header matcher supports fast prefix and suffix matching (#2888)Matthew Holt
2019-11-27reverse_proxy: Add flush_interval to caddyfile syntax (#1460)Matthew Holt
Also add godoc for Caddyfile syntax for file_server
2019-11-27admin: Preserve "@id" fields through partial changes (fixes #2902)Matthew Holt
2019-11-18reverse_proxy: Fix invalid argument to Intn in RandomChoice selectionMatthew Holt
2019-11-16file_server: Use HTTPS port when a qualifying domain is specifiedMatthew Holt
Also little comment cleanups
2019-11-15file_server: Optional pass_thru modeMatthew Holt
If enabled, will call the next handler in the chain instead of returning a 404.
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-15http: Only enable access logs if configuredMatthew Holt
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-15cmd: Improve stop command by trying API before signaling processMatthew Holt
This allows graceful shutdown on all platforms
2019-11-15Minor cleanupsMatthew Holt
2019-11-15http: Make path matcher case-insensitiveMatthew Holt
Adds tests for both the path matcher and host matcher for case insensitivity. If case sensitivity is required for the path, a regexp matcher can be used instead. This is the v2 equivalent fix of PR #2882.
2019-11-11core: Add tests to Replacer; fix panic (fixes #2852)Matthew Holt
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-11http: Add response headers to access logsMatthew Holt
2019-11-11http: Use permanent redirects for HTTP->HTTPSMatthew Holt
2019-11-11logging: Support placeholders in level and filename (#2872)Sarat Chandra
* Add support for placeholders in Config Fixes #2870 * Replace placeholders only in logging config. Placeholders in log level and filename incase of file output are replaced. * Add Provision to filewriter module for replacing placeholders
2019-11-09go.mod: update quic-go to v0.13.1 (#2871)Marten Seemann
2019-11-08cmd: Print errors to stderrMatthew Holt
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-05http: Eliminate allocation in cloneURL; add RemoteAddr to origRequestMatthew Holt
2019-11-05reverse_proxy: Make HTTP versions configurable, don't set NextProtosMatthew Holt
2019-11-04Prepare for beta 9 tagMatthew Holt
2019-11-04caddyfile: Fix bug with DeleteMatthew Holt
It now will delete the current token even if it is the last one
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-04admin: Remove /unload endpoint (is same as DELETE /config/)Matthew Holt
2019-11-04reverse_proxy: Add port to upstream address if only implied in schemeMatthew Holt
2019-11-04http: Only log handler errors >= 500Matthew Holt
Errors in the 4xx range are client errors, and they don't need to be entered into the server's error logs. 4xx errors are still recorded in the access logs at the error level.
2019-11-04logging: Default logger should use wall time with millisecondsMatthew Holt
This format is easier for humans to read and is still very precise.
2019-11-04cmd: Move module imports into standard packagesMatthew Holt
This makes it easier to make "standard" caddy builds, since you'll only need to add a single import to get all of Caddy's standard modules. There is a package for all of Caddy's standard modules (modules/standard) and a package for the HTTP app's standard modules only (modules/caddyhttp/standard). We still need to decide which of these, if not all of them, should be kept in the standard build. Those which aren't should be moved out of this repo. See #2780.
2019-11-04core: Synchronize calls to SetDeadline within fakeCloseListenerMatthew Holt
First evidenced in #2658, listener deadlines would sometimes be set after clearing them, resulting in endless i/o timeout errors, which leave all requests hanging. This bug is fixed by synchronizing the calls to SetDeadline: when Close() is called, the deadline is first set to a time in the past, and the lock is released only after the deadline is set, so when the other servers break out of their Accept() calls, they will clear the deadline *after* it was set. Before, the clearing could sometimes come before the set, which meant that it was left in a timeout state indefinitely. This may not yet be a perfect solution -- ideally, the setting and clearing of the deadline would happen exactly once per underlying listener, not once per fakeCloseListener, but in rigorous testing with these changes (comprising tens of thousands of config reloads), I was able to verify that no race condition is manifest.
2019-11-04core: Major refactor of admin endpoint and config handlingMatthew Holt
Fixed several bugs and made other improvements. All config changes are now mediated by the global config state manager. It used to be that initial configs given at startup weren't tracked, so you could start caddy with --config caddy.json and then do a GET /config/ and it would return null. That is fixed, along with several other general flow/API enhancements, with more to come.
2019-10-31http: Ensure server loggers are not nil (fixes #2849)Matthew Holt
2019-10-31reverse_proxy: Fix panic for some CLI flag values (closes #2848)Matthew Holt
2019-10-30http: Avoid panic if handler errors lack underlying error valueMatthew Holt
Fixes #2845
2019-10-31Re-remove admin fuzz target from azure-pipelines.yml (#2846)Mohammed Al Sahaf
Fixing a git-oopsie on my behalf
2019-10-30admin listener as opt-in for initial config (#2834)Andreas Schneider
* Always cleanup admin endpoint first * Error out if no config has been set (#2833) * Ignore explicitly missing admin config (#2833) * Separate config loading from admin initialization (#2833) * Add admin option to specify admin listener address (#2833) * Use zap for reporting admin endpoint status
2019-10-30Add missing fuzzer (#2844)Mohammed Al Sahaf
* fuzz: add missing fuzzer by fixing .gitignore adding a negation for caddyfile/ directory * ci: print fuzzing type for debuggability and traceability * README: update the Fuzzit badge to point to the correct Caddy server Github organization
2019-10-30auth: Clean up basicauthMatthew Holt
2019-10-30fuzz: Remove admin fuzzerMatthew Holt
Not really necessary; underlying work is done by json.Unmarshal which is part of the Go standard lib. Also, it called Run, which potentially tries to get certificates; we should not let that happen.
2019-10-30ci: Change fuzz type from regression to local-regressionMatthew Holt
As per recommendation from Fuzzit devs
2019-10-30fuzz: Don't call Load() in HTTP caddyfile adapter fuzz testsMatthew Holt
Doing so has a tendency to request certificates...
2019-10-29reverse_proxy: Structured logsMatthew Holt
2019-10-29ci: Update fuzzer target name (#2841)Mohammed Al Sahaf
Update the fuzzer target name for the address parser so it better matches the func name
2019-10-29Remove unused fields from HandlerErrorMatthew Holt
2019-10-29logging: Tweak defaults (enable logging by default, color level enc.)Matthew Holt