iris icon indicating copy to clipboard operation
iris copied to clipboard

How to exclude the specified directory using SPA

Open aadog opened this issue 2 years ago • 14 comments

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

aadog avatar Mar 28 '22 03:03 aadog

@kataras It seems that I haven't heard from you for a week. Are you okay, friend

aadog avatar Apr 01 '22 03:04 aadog

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,

kataras avatar Apr 02 '22 18:04 kataras

Sorry, I just don't want your health to go wrong, because you haven't had a good work and rest time

aadog avatar Apr 03 '22 04:04 aadog

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.

aadog avatar Apr 03 '22 04:04 aadog

I have used many methods, and it seems that I can't pay for supporters. I want to be your supporter

aadog avatar Apr 03 '22 04:04 aadog

Hello @aadog,

I don't know to setup Alipay or WeChat payments. Could you help us?

kataras avatar Apr 18 '22 12:04 kataras

https://www.alipay.com/

aadog avatar Apr 18 '22 13:04 aadog

https://global.alipay.com/

aadog avatar Apr 18 '22 13:04 aadog

This is China's largest third party payment platform, Alipay.

aadog avatar Apr 18 '22 13:04 aadog

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 avatar Apr 18 '22 13:04 aadog

@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

kataras avatar Jul 15 '22 17:07 kataras

open https://memberprod.alipay.com/account/reg/index.htm

image

aadog avatar Jul 17 '22 12:07 aadog

@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: 294904409_355119796632021_6718526359424670534_n

I've putted my greek bank card but it doesn't work :/

kataras avatar Jul 22 '22 09:07 kataras

Alipay overseas telephone support: +86 571 95188

aadog avatar Jul 23 '22 04:07 aadog