mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
Fix local file system storage provider path error
This commit is contained in:
@ -51,6 +51,12 @@ func StaticFilter(ctx *context.Context) {
|
|||||||
path += urlPath
|
path += urlPath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
path2 := strings.TrimLeft(path, "web/build/images/")
|
||||||
|
if util.FileExist(path2) {
|
||||||
|
http.ServeFile(ctx.ResponseWriter, ctx.Request, path2)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if !util.FileExist(path) {
|
if !util.FileExist(path) {
|
||||||
path = "web/build/index.html"
|
path = "web/build/index.html"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user