Hello, recently we refactored our app and switched to Next JS. Currently we are testing it on our client's test env and we encountered a redirect loop.
We are using middleware and a base path change but even without these two, the redirect loop happens.
Previously we were using Nginx (for context path since client requested app to be under <domain>/app) and serving it as static files (Vite) and we had no issue.
We still need to keep <domain>/app as a homepage for our app.
Worth noting, client has it's own proxy that redirects user to SSO and back to our app.
Any idea what may be happening, any guidance?
Thank you.
EDIT: Forgot to mention that we are not using Nginx anymore.