mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 04:30:05 +00:00
feat: enhance template configuration and update README for translation status
This commit is contained in:
@@ -240,11 +240,11 @@ func fallbackToFrontend(frontendDist fs.FS) func(*gin.Context) {
|
||||
}
|
||||
if strings.HasPrefix(c.Request.URL.Path, "/dashboard") {
|
||||
stripPath := strings.TrimPrefix(c.Request.URL.Path, "/dashboard")
|
||||
localFilePath := path.Join("admin-dist", stripPath)
|
||||
localFilePath := path.Join(singleton.Conf.AdminTemplate, stripPath)
|
||||
if checkLocalFileOrFs(c, frontendDist, localFilePath) {
|
||||
return
|
||||
}
|
||||
if !checkLocalFileOrFs(c, frontendDist, "admin-dist/index.html") {
|
||||
if !checkLocalFileOrFs(c, frontendDist, singleton.Conf.AdminTemplate+"/index.html") {
|
||||
c.JSON(http.StatusOK, newErrorResponse(errors.New("404 Not Found")))
|
||||
}
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user