mirror of
https://github.com/infinite-iroha/touka.git
synced 2026-02-03 00:41:10 +08:00
fix StaticFS
This commit is contained in:
parent
38ff5126e3
commit
5b98310de5
1 changed files with 2 additions and 2 deletions
|
|
@ -244,7 +244,7 @@ func (engine *Engine) StaticFS(relativePath string, fs http.FileSystem) {
|
||||||
relativePath += "/"
|
relativePath += "/"
|
||||||
}
|
}
|
||||||
|
|
||||||
fileServer := http.FileServer(fs)
|
fileServer := http.StripPrefix(relativePath, http.FileServer(fs))
|
||||||
engine.ANY(relativePath+"*filepath", GetStaticFSHandleFunc(fileServer))
|
engine.ANY(relativePath+"*filepath", GetStaticFSHandleFunc(fileServer))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -258,7 +258,7 @@ func (group *RouterGroup) StaticFS(relativePath string, fs http.FileSystem) {
|
||||||
relativePath += "/"
|
relativePath += "/"
|
||||||
}
|
}
|
||||||
|
|
||||||
fileServer := http.FileServer(fs)
|
fileServer := http.StripPrefix(relativePath, http.FileServer(fs))
|
||||||
group.ANY(relativePath+"*filepath", GetStaticFSHandleFunc(fileServer))
|
group.ANY(relativePath+"*filepath", GetStaticFSHandleFunc(fileServer))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue