mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-07 11:28:48 +03:00
Merge pull request #247 from DenBeke/master
fastcgi: Stripping PATH_INFO from SCRIPT_NAME
This commit is contained in:
commit
79a7f8a460
2 changed files with 5 additions and 2 deletions
3
middleware/fastcgi/fastcgi.go
Normal file → Executable file
3
middleware/fastcgi/fastcgi.go
Normal file → Executable file
|
@ -166,6 +166,9 @@ func (h Handler) buildEnv(r *http.Request, rule Rule, fpath string) (map[string]
|
|||
scriptFilename = absPath
|
||||
}
|
||||
|
||||
// Strip PATH_INFO from SCRIPT_NAME
|
||||
scriptName = strings.TrimSuffix(scriptName, pathInfo)
|
||||
|
||||
// Get the request URI. The request URI might be as it came in over the wire,
|
||||
// or it might have been rewritten internally by the rewrite middleware (see issue #256).
|
||||
// If it was rewritten, there will be a header indicating the original URL,
|
||||
|
|
Loading…
Reference in a new issue