mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
fastcgi: Trim dot and space suffix for Windows sake (#2917)
This commit is contained in:
parent
f0eae39cb2
commit
008415f206
1 changed files with 2 additions and 0 deletions
|
@ -85,6 +85,8 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error)
|
|||
// but we also want to be flexible for the script we proxy to.
|
||||
|
||||
fpath := r.URL.Path
|
||||
// We trim those characters because they are served as plain text if appended after .php on Windows
|
||||
fpath = strings.TrimRight(fpath, " .")
|
||||
|
||||
if idx, ok := httpserver.IndexFile(h.FileSys, fpath, rule.IndexFiles); ok {
|
||||
fpath = idx
|
||||
|
|
Loading…
Reference in a new issue