- 07 Mar, 2017 2 commits
-
-
crvv authored
If use gzip and templates at the same time, the response body will be gzipped data. And in this case, the Content-Type header won't be set by Caddy code. Then Go http package will set "Content-Type" to wrong value "application/x-gzip" which is determined by response body. So the header Contenty-Type should be set in templates middleware.
-
Matthew Holt authored
See: https://forum.caddyserver.com/t/reloading-template-files-as-they-change/1483/3?u=matt The server takes a moment to start; if USR1 is received before the instance is saved, it would panic because no instances have been saved. Instead, we just ignore the signal since no config has finished loading.
-
- 03 Mar, 2017 1 commit
-
-
Samuel BERTHE authored
* feat(request placeholders): adds {?arg} * test(request placeholders): test query argument extractor {?arg}
-
- 28 Feb, 2017 2 commits
-
-
ericdreeves authored
* Use RequestURI when redirecting to canonical path. Caddy may trim a request's URL path when it starts with the path that's associated with the virtual host. This change uses the path from the request's RequestURI when performing a redirect. Fix issue #1327. * Rename redirurl to redirURL. * Redirect to the full URL. The scheme and host from the virtual host's site configuration is used in order to redirect to the full URL. * Add comment and remove redundant check. * Store the original URL path in request context. By storing the original URL path as a value in the request context, middlewares can access both it and the sanitized path. The default default FileServer handler will use the original URL on redirects. * Replace contextKey type with CtxKey. In addition to moving the CtxKey definition to the caddy package, this change updates the CtxKey references in the httpserver, fastcgi, and basicauth packages. * httpserver: Fix reference to CtxKey
-
Matthew Holt authored
-
- 22 Feb, 2017 3 commits
-
-
Matthew Holt authored
-
Matthew Holt authored
Timeouts are important for mitigating slowloris, yes. But after a number of complaints and seeing that default timeouts are a sore point of confusion, we're disabling them now. However, the code that sets default timeouts remains intact; the defaults are just the zero value. While Caddy aims to be secure by default, Caddy also aims to serve a worldwide audience. Even my own internet here in Utah is poor at times, with bad WiFi signal, causing some connections to take over 10s to be established. Many use the Internet while commuting on slower connection speeds. Latency across country borders is another concern. As such, disabling default timeouts will serve a greater population of users than enabling them, as slowloris is easy to mitigate and does not seem to be reported often (I've only seen it once). It's also very difficult sometimes to distinguish slowloris from genuine slow networks. That decision is best left to the site owner for now.
-
Matthew Holt authored
-
- 21 Feb, 2017 2 commits
-
-
Matthew Holt authored
-
Matt Holt authored
* tls: Refactor TLS config innards with a few minor syntax changes muststaple -> must_staple "http2 off" -> "alpn" with list of ALPN values * Fix typo * Fix QUIC handler * Inline struct field assignments
-
- 20 Feb, 2017 3 commits
-
-
Matt Holt authored
-
Toby Allen authored
Revert removed method IncrNest
-
Mateusz Gajewski authored
-
- 19 Feb, 2017 1 commit
-
-
Mateusz Gajewski authored
* Disable TLS completely if there is no listener with tls enabled * Format code
-
- 18 Feb, 2017 4 commits
-
-
Rick Beton authored
* Revised fileserver Accept-Encoding and ETag * calculateEtag improved following microbenchmarking
-
Mateusz Gajewski authored
* Push down headers from client * Push first, serve later * After review fixes
-
Matthew Holt authored
-
Mateusz Gajewski authored
* Remove manual TLS clone method * WiP tls * Use GetClientConfig for tls.Config * gofmt -s -w * GetConfig * Handshake * Removed comment * Disable HTTP2 on demand * Remove junk * Remove http2 enable (no-op)
-
- 17 Feb, 2017 7 commits
-
-
Kurt Jung authored
* Store name of authenticated user in basicauth for use by upstream middleware such as fastcgi and cgi. * Use request context to transfer name of authorized user from basicauth to upstream middleware. Test retrieval of name from context. * Remove development code that was inadvertently left in place * Use keys of type httpserver.CtxKey to access Context values
-
Matt Holt authored
* WIP: Implement HTTPS interception detection by Durumeric, et. al. Special thanks to @FiloSottile for guidance with the custom listener. * Add {{.IsMITM}} context action and {mitm} placeholder * Improve MITM detection heuristics for Firefox and Edge * Add tests for MITM detection heuristics * Improve Safari heuristics for interception detection * Read ClientHello during first Read() instead of during Accept() As far as I can tell, reading the ClientHello during Accept() prevents new connections from being accepted during the read. Since Read() should be called in its own goroutine, this keeps Accept() non-blocking. * Clean up MITM detection handler; make possible to close connection * Use standard lib cipher suite values when possible * Improve Edge heuristics and test cases * Refactor MITM checking logic; add some debug statements for now * Fix bug in MITM heuristic tests and actual heuristic code * Fix gofmt * Remove debug statements; preparing for merge
-
Mateusz Gajewski authored
* WIP * HTTP2/Push for golang 1.8 * Push plugin completed for review * Correct build tag * Move push plugin position * Add build tags to tests * Gofmt that code * Add header/method validations * Load push plugin * Fixes for wrapping writers * Push after delivering file * Fixes, review changes * Remove build tags, support new syntax * Fix spelling * gofmt -s -w . * Gogland time * Add interface guards * gofmt * After review fixes
-
elcore authored
-
Matt Holt authored
proxy: handle encoded path in URL
-
Tw authored
fix issue #1362 Signed-off-by: Tw <tw19881113@gmail.com>
-
elcore authored
* Implement curve X25519 * caddytls: Added a default curves list * caddytls: Improve tests
-
- 16 Feb, 2017 9 commits
-
-
Matt Holt authored
Replace our old faithful gracefulListener with Go 1.8's Shutdown()
-
Matt Holt authored
Set Go 1.8's ReadHeaderTimeout and IdleTimeout
-
Matt Holt authored
Set session ticket keys properly (fixed in Go 1.8)
-
Matt Holt authored
-
Toby Allen authored
-
Alex Harrington authored
* fixing panic when root is symlink checking root path is a symlink before os.Stat which panics * fixing formatting * adding test to verify symlink root path check * fixing typo
-
Augusto Roman authored
* Add request placeholder support for querying request cookies. This adds the ability to query the request cookies for placeholders using the syntax "@cookiename". For example, this would allow rewriting based on a cookie: rewrite { if @version is 'dev' to /dev/index.html } * Switch cookie special char from @ to : * Switch special char for cookies from : to ~
-
Matt Holt authored
return 404 for "not a directory" errors
-
Matt Holt authored
redirect: determine the FromScheme at runtime (#1297)
-
- 15 Feb, 2017 1 commit
-
-
Augusto Roman authored
* Fix data race for max connection limiting in proxy directive. The Conns and Unhealthy fields are updated concurrently across all active requests. Because of this, they must use atomic operations for reads and writes. Prior to this change, Conns was incremented atomically, but read unsafely. Unhealthly was updated & read unsafely. The new test TestReverseProxyMaxConnLimit exposes this race when run with -race. Switching to atomic operations makes the race detector happy. * oops, remove leftover dead code.
-
- 14 Feb, 2017 4 commits
-
-
Matt Holt authored
Added Sourcegraph badge to README
-
Rohan Pai authored
-
Matt Holt authored
httpserver: Register cgi plugin
-
Toby Allen authored
Fix for #1388 starting with no Caddyfile
-
- 13 Feb, 2017 1 commit
-
-
Toby Allen authored
-