I have backend + database running on localhost:81, and my frontend which is a separate app on my_local:3000.
Now, my frontend needs to communicate with the backend through ngrok due to external services.
So, my app uses the my-local.ngrok.io as API domain, which then forwards the requests to localhost:81.
All of that works fine, but the problem is the cookies. The backend is not able to set cookies for both the ngrok, and the my_local, which means that my requests are unauthorized.
Is there a way for cookies to be set for both domains? We tried simply adding both domains in the BE, and I see the cookies as part of the response, but they never get set on my_local.
My FE is a react app, BE is C# if that helps.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…