Merge pull request #14 from owncloud/fix/static-assets

fix serving static issues
This commit is contained in:
Thomas Müller
2019-12-17 09:40:55 +01:00
committed by GitHub

View File

@@ -8,8 +8,12 @@ import (
// Static is a middleware that serves static assets.
func Static(root string, fs http.FileSystem) func(http.Handler) http.Handler {
if !strings.HasSuffix(root, "/") {
root = root + "/"
}
static := http.StripPrefix(
root+"/",
root,
http.FileServer(
fs,
),