0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00
caddy/caddyhttp/httpserver
ericdreeves 0a0d2cc1cf Use RequestURI when redirecting to canonical path. (#1331)
* 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
2017-02-28 05:54:12 -07:00
..
condition.go Fix small misspellings 2017-01-10 13:09:24 -08:00
condition_test.go Fix misspellings 2016-09-05 10:20:34 -06:00
context.go Use RequestURI when redirecting to canonical path. (#1331) 2017-02-28 05:54:12 -07:00
context_test.go Ensure some tests remove temporary directories they created 2016-11-28 22:26:54 -07:00
error.go add more descriptive errors 2016-10-11 10:34:51 +08:00
https.go tls: Refactor internals related to TLS configurations (#1466) 2017-02-21 09:49:22 -07:00
https_test.go Rewrote Caddy from the ground up; initial commit of 0.9 branch 2016-06-04 17:00:29 -06:00
logger.go Feature #1246 - Remote syslog (#1301) 2017-02-08 08:02:09 -07:00
logger_test.go Feature #1246 - Remote syslog (#1301) 2017-02-08 08:02:09 -07:00
middleware.go Clarify godoc for HTTP handler signature 2016-08-25 17:13:49 -06:00
middleware_test.go Rewrote Caddy from the ground up; initial commit of 0.9 branch 2016-06-04 17:00:29 -06:00
mitm.go Use RequestURI when redirecting to canonical path. (#1331) 2017-02-28 05:54:12 -07:00
mitm_test.go Use RequestURI when redirecting to canonical path. (#1331) 2017-02-28 05:54:12 -07:00
path.go Proposal: Middleware Config (#908) 2016-07-08 18:12:52 -06:00
pathcleaner.go Implementing custom PathClean function to allow masking, closes #1298 (#1317) 2016-12-31 20:29:14 -07:00
pathcleaner_test.go Implementing custom PathClean function to allow masking, closes #1298 (#1317) 2016-12-31 20:29:14 -07:00
plugin.go HTTP/2 push support (golang 1.8) (#1215) 2017-02-17 09:25:22 -07:00
plugin_test.go Add tests for case insensitivity of keys and saving contexts 2016-09-24 13:24:33 -06:00
recorder.go HTTP/2 push support (golang 1.8) (#1215) 2017-02-17 09:25:22 -07:00
recorder_test.go Rewrote Caddy from the ground up; initial commit of 0.9 branch 2016-06-04 17:00:29 -06:00
replacer.go Use RequestURI when redirecting to canonical path. (#1331) 2017-02-28 05:54:12 -07:00
replacer_test.go Add request placeholder support for querying request cookies. (#1392) 2017-02-15 21:59:24 -07:00
roller.go Roll all logs by default (#1379) 2017-02-08 09:23:33 -07:00
server.go Use RequestURI when redirecting to canonical path. (#1331) 2017-02-28 05:54:12 -07:00
server_test.go tls: Refactor internals related to TLS configurations (#1466) 2017-02-21 09:49:22 -07:00
siteconfig.go New 'timeouts' directive to configure timeouts; default timeouts enabled (#1368) 2017-01-24 08:15:25 -07:00
vhosttrie.go Don't treat localhost specially when assigning bind address 2016-06-27 13:14:28 -06:00
vhosttrie_test.go Rewrote Caddy from the ground up; initial commit of 0.9 branch 2016-06-04 17:00:29 -06:00