How to write a rewrite rule to remove the query parameters - Next.js app with proxy to another Next.js app #1931
Unanswered
ThangHuuVu
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hey @ThangHuuVu. I've spoken to the team working on our redirect engine and you can add a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there 👋, I want to ask about this case for Netlify Proxies:
basePath
and trailing slash)_redirects
file:/authjs/* https://next-auth-behind-cdn.vercel.app/authjs/:splat 200!
code
andstate
are still shown, while I expect it to not shownThis is not happening in a normal Auth app, where the query parameters got stripped down after the OAuth callback.
I'm currently removing the query params by using the Next.js router like this:
but I feel this can be achieved using either Netlify rewrites or Next.js rewrites. I've tried:
_redirects file
or in my Auth app's next.config.js:
None of the above works for me, so I would really appreciate any help here 🙏 Thanks for reading!
Repos:
Beta Was this translation helpful? Give feedback.
All reactions