mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 10:45:47 +08:00
feat: fix StaticFilter issue
This commit is contained in:
parent
855259c6e7
commit
ba97458edd
@ -294,7 +294,7 @@ func (c *ApiController) UploadResource() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
_, applicationId := util.GetOwnerAndNameFromIdNoCheck(strings.TrimRight(fullFilePath, ".html"))
|
_, applicationId := util.GetOwnerAndNameFromIdNoCheck(strings.TrimSuffix(fullFilePath, ".html"))
|
||||||
applicationObj, err := object.GetApplication(applicationId)
|
applicationObj, err := object.GetApplication(applicationId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.ResponseError(err.Error())
|
c.ResponseError(err.Error())
|
||||||
|
@ -55,7 +55,7 @@ func StaticFilter(ctx *context.Context) {
|
|||||||
path += urlPath
|
path += urlPath
|
||||||
}
|
}
|
||||||
|
|
||||||
path2 := strings.TrimLeft(path, "web/build/images/")
|
path2 := strings.TrimPrefix(path, "web/build/images/")
|
||||||
if util.FileExist(path2) {
|
if util.FileExist(path2) {
|
||||||
makeGzipResponse(ctx.ResponseWriter, ctx.Request, path2)
|
makeGzipResponse(ctx.ResponseWriter, ctx.Request, path2)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user