mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-25 09:40:13 +08:00
fastcgi: Trim dot and space suffix for Windows sake (#2917)
This commit is contained in:
parent
f0eae39cb2
commit
008415f206
|
@ -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 New Issue
Block a user