summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2019-10-29proxy: Forgot to commit importMatthew Holt
2019-10-29caddyhttp: Fix nil pointer dereferenceMatthew Holt
2019-10-29proxy: Enable HTTP/2 on transport to backendMatthew Holt
2019-10-29Plug in distributed STEK moduleMatthew Holt
2019-10-28cache: Make peer addresses configurableMatthew 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-28fuzz-ci: fix & enhance fuzzing process (#2835)Mohammed Al Sahaf
* fuzz-ci: fix the authentication call for fuzzit by using the --api-key flag rather than the `auth` command * Allow fuzzing on schedules as well as non-fork PRs Closes #2710
2019-10-25fuzz: introduce continuous fuzzing for Caddy (#2723)Mohammed Al Sahaf
* fuzz: lay down the foundation for continuous fuzzing * improve the fuzzers and add some * fuzz: add Fuzzit badge to README & enable fuzzers submission in CI * v2-fuzz: do away with the submodule approach for fuzzers * fuzz: enable fuzzit
2019-10-21tls: Make the on-demand rate limiter actually workMatthew Holt
This required a custom rate limiter implementation in CertMagic
2019-10-19rewrite: Options to strip prefix/suffix and issue redirectsMatthew Holt
Fixes #2011