mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-22 18:25:47 +08:00
Show 404 error for index.html not found
This commit is contained in:
parent
684cbdb951
commit
070aa8a65f
@ -77,6 +77,7 @@ func StaticFilter(ctx *context.Context) {
|
||||
panic(err)
|
||||
}
|
||||
dir = strings.ReplaceAll(dir, "\\", "/")
|
||||
ctx.ResponseWriter.WriteHeader(http.StatusNotFound)
|
||||
errorText := fmt.Sprintf("The Casdoor frontend HTML file: \"index.html\" was not found, it should be placed at: \"%s/web/build/index.html\". For more information, see: https://casdoor.org/docs/basic/server-installation/#frontend-1", dir)
|
||||
http.ServeContent(ctx.ResponseWriter, ctx.Request, "Casdoor frontend has encountered error...", time.Now(), strings.NewReader(errorText))
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user