fix: strip baseurl (#626)
parent
f1c86054b3
commit
73e0acaa71
|
@ -64,9 +64,5 @@ func handle(fn handleFunc, prefix string, storage *storage.Storage, server *sett
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if prefix == "" {
|
|
||||||
return handler
|
|
||||||
}
|
|
||||||
|
|
||||||
return http.StripPrefix(prefix, handler)
|
return http.StripPrefix(prefix, handler)
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,5 +60,5 @@ func NewHandler(storage *storage.Storage, server *settings.Server) (http.Handler
|
||||||
public.PathPrefix("/dl").Handler(monkey(publicDlHandler, "/api/public/dl/")).Methods("GET")
|
public.PathPrefix("/dl").Handler(monkey(publicDlHandler, "/api/public/dl/")).Methods("GET")
|
||||||
public.PathPrefix("/share").Handler(monkey(publicShareHandler, "/api/public/share/")).Methods("GET")
|
public.PathPrefix("/share").Handler(monkey(publicShareHandler, "/api/public/share/")).Methods("GET")
|
||||||
|
|
||||||
return r, nil
|
return http.StripPrefix(server.BaseURL, r), nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue