Describe the issue you are facing or ask for help
app := iris.New().Configure(iris.WithLowercaseRouting)
// Serve our front-end and its assets.
app.HandleDir("/", iris.Dir("./app/public"), iris.DirOptions{
SPA: true,
IndexName: "index.html",
})
sess := sessions.New(sessions.Config{Cookie: "sessionId"})
sess.UseDatabase(sessionDB)
app.Use(sess.Handler())
app.Use(antd.NewSessionAuth(enforcer).Handler())
app.PartyFunc("/api", func(api router.Party) {
mvc.New(api.Party("/shopee")).Handle(&controllers.Shopee{}).HandleError(antd.HandlerError)
mvc.New(api.Party("/addresss")).Handle(&controllers.Addresss{}).HandleError(antd.HandlerError)
}).OnAnyErrorCode(func(c *context.Context) {
fmt.Println("xxx")
})
app.Listen(":8080")
/api
/How the API handles its own 404 errors,
Or use spa to exclude the / API directory, at least when 404 occurs, and skip cache
Describe the issue you are facing or ask for help
/api
/How the API handles its own 404 errors,
Or use spa to exclude the / API directory, at least when 404 occurs, and skip cache