0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00
caddy/caddyhttp/fastcgi
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
..
dialer.go Re-align atomic struct field (fixes #1306) 2016-12-22 15:02:33 -07:00
dialer_test.go Fastcgi upstreams (#1264) 2016-11-16 21:29:43 -07:00
fastcgi.go Use RequestURI when redirecting to canonical path. (#1331) 2017-02-28 05:54:12 -07:00
fastcgi_test.go Add send_timeout property to fastcgi directive. 2016-12-03 16:15:41 -06:00
fcgi_test.php Migrate remaining middleware packages 2016-06-05 22:39:23 -06:00
fcgiclient.go Add send_timeout property to fastcgi directive. 2016-12-03 16:15:41 -06:00
fcgiclient_test.go Add send_timeout property to fastcgi directive. 2016-12-03 16:15:41 -06:00
setup.go Add root option to fastcgi directive (#1337) 2017-01-17 10:34:17 -07:00
setup_test.go Add root option to fastcgi directive (#1337) 2017-01-17 10:34:17 -07:00