mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-31 08:15:55 +08:00
core: Implement FastAbs to avoid repeated os.Getwd calls (#6687)
* core: Implement FastAbs to avoid repeated os.Getwd calls * Lint * Rename files
This commit is contained in:
@ -228,7 +228,7 @@ func (t Transport) buildEnv(r *http.Request) (envVars, error) {
|
||||
ip = strings.Replace(ip, "]", "", 1)
|
||||
|
||||
// make sure file root is absolute
|
||||
root, err := filepath.Abs(repl.ReplaceAll(t.Root, "."))
|
||||
root, err := caddy.FastAbs(repl.ReplaceAll(t.Root, "."))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user