mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-09 11:42:57 +00:00
clean AbsoluteURL
This commit is contained in:
parent
7ed515dba8
commit
aa79b076ae
@ -76,8 +76,9 @@ func Parse(c *caddy.Controller) ([]Config, error) {
|
||||
}
|
||||
|
||||
caddyConf := httpserver.GetConfig(c)
|
||||
cfg.AbsoluteURL = caddyConf.Addr.Path + "/" + cfg.BaseURL
|
||||
cfg.AbsoluteURL = strings.TrimSuffix(caddyConf.Addr.Path, "/") + "/" + cfg.BaseURL
|
||||
cfg.AbsoluteURL = strings.Replace(cfg.AbsoluteURL, "//", "/", -1)
|
||||
cfg.AbsoluteURL = strings.TrimSuffix(cfg.AbsoluteURL, "/")
|
||||
cfg.AddrPath = strings.TrimSuffix(caddyConf.Addr.Path, "/")
|
||||
cfg.Root = http.Dir(cfg.PathScope)
|
||||
if err := appendConfig(cfg); err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user