Cors subdomains
Hi, I have hard time implementing CORS into t3stack, I have two subdomains:
They are calling trpc that is on
This works on localhost but does not on vercel hosting, is there anything specific I have to do?
5 Replies
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
@zeztron could you elaborate further?
I changed the endpoint to one from T3stack docs
Working on localhost - not working on vercel
I added those
into next.config.mjs and still nothing works on vercel π¦
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
It's from official t3stack docs,
I also tried normal cors package with nextjs middleware & right now I'm setting it manually by:
All of my tries works on localhost but not one of them on vercel
Fixed, I was missing www. in my domain URL, only the URL with www. has the vercel headers, weird because I literally have it under the version without www as well
Hi @Jaaneek, sorry to bother you, could you share the code snippet for this problem? Even if it's embedded in your project, just to see how you've implemented secure subdomain authentication