fix(embed_fs): enable embed fs for prod

This commit is contained in:
hexxa 2022-04-17 12:33:11 +08:00 committed by Hexxa
parent 56505dacdd
commit d7263cc3c8
3 changed files with 19 additions and 8 deletions

View file

@ -82,7 +82,10 @@ func (h *MultiUsersSvc) APIAccessControl() gin.HandlerFunc {
return
} else if accessPath == "/" || // TODO: temporarily allow accessing static resources
accessPath == "/favicon.ico" ||
strings.HasPrefix(accessPath, "/static") {
strings.HasPrefix(accessPath, "/css") ||
strings.HasPrefix(accessPath, "/font") ||
strings.HasPrefix(accessPath, "/img") ||
strings.HasPrefix(accessPath, "/js") {
c.Next()
return
}