mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-23 05:20:15 -05:00
Merge pull request #14 from owncloud/fix/static-assets
fix serving static issues
This commit is contained in:
@@ -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,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user