mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 04:30:05 +00:00
feat: multi user template
This commit is contained in:
@@ -249,11 +249,11 @@ func fallbackToFrontend(adminFrontend, userFrontend fs.FS) func(*gin.Context) {
|
||||
}
|
||||
return
|
||||
}
|
||||
localFilePath := path.Join("user-dist", c.Request.URL.Path)
|
||||
localFilePath := path.Join(singleton.Conf.UserTemplate, c.Request.URL.Path)
|
||||
if checkLocalFileOrFs(c, userFrontend, localFilePath) {
|
||||
return
|
||||
}
|
||||
if !checkLocalFileOrFs(c, userFrontend, "user-dist/index.html") {
|
||||
if !checkLocalFileOrFs(c, userFrontend, singleton.Conf.UserTemplate+"/index.html") {
|
||||
c.JSON(http.StatusOK, newErrorResponse(errors.New("404 Not Found")))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user