mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-23 11:15:04 +08:00
parent
235357abc8
commit
2eede58b3a
|
@ -164,7 +164,12 @@ func (t Transport) buildEnv(r *http.Request) (map[string]string, error) {
|
||||||
ip = strings.Replace(ip, "[", "", 1)
|
ip = strings.Replace(ip, "[", "", 1)
|
||||||
ip = strings.Replace(ip, "]", "", 1)
|
ip = strings.Replace(ip, "]", "", 1)
|
||||||
|
|
||||||
root := repl.ReplaceAll(t.Root, ".")
|
// make sure file root is absolute
|
||||||
|
root, err := filepath.Abs(repl.ReplaceAll(t.Root, "."))
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
fpath := r.URL.Path
|
fpath := r.URL.Path
|
||||||
|
|
||||||
// Split path in preparation for env variables.
|
// Split path in preparation for env variables.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user