iris
iris copied to clipboard
How to exclude the specified directory using SPA
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
@kataras It seems that I haven't heard from you for a week. Are you okay, friend
Hello @aadog, I have a daily working life that's why I may be slow to answer to some of the questions.
I already answered to you at https://github.com/kataras/iris/issues/1869#issuecomment-1086635704, please take time to reply whenever you can.
Can you describe better what you'd expect and post a runnable example that I can copy-paste and re-produce your issue please? Please post the http responses you expected and the target urls too.
Thanks,
Sorry, I just don't want your health to go wrong, because you haven't had a good work and rest time
Besides, can you provide China style support payment? For example, Alipay or WeChat is too difficult to register in China because we do not have credit card PayPal.
I have used many methods, and it seems that I can't pay for supporters. I want to be your supporter
Hello @aadog,
I don't know to setup Alipay or WeChat payments. Could you help us?
https://www.alipay.com/
https://global.alipay.com/
This is China's largest third party payment platform, Alipay.
This is Alipay, the largest third party payment platform in China.
In China, you have many supporters who want to sponsor you, but there is no effective payment method,
Kataras, you seem to be the most popular open source author among Chinese developers in the golang community
@aadog thanks a lot for your words! I've tried to open an alipay global account, it's still in review. I don't think I will get it, didn't find enough documentation to accept payments through QR Code or API with AliPay Global but I will keep trying - if you know how we can do it please provide me some assistance
open https://memberprod.alipay.com/account/reg/index.htm
@aadog
It seems that I had an account from 2020 September when I tried to login it shows my name and my photo. However, I can't login because the app needs some strange verification:
I've putted my greek bank card but it doesn't work :/
Alipay overseas telephone support: +86 571 95188