We are migrating into Vercel and want to use a rolled migration where we can point individual routes of our application to Vercel. We are also running behind an external WAF. We've read the proxy docs but are unclear on how to get things working when the domain itself is not pointed to Vercel.
Our current configuration is as follows:
- Primary domain (domain.com) points to WAF, then forwards onto a different hosts depending on routes
domain.com/myroutepoints to Vercel via a hidden subdomain (vercel.hiddendomain.com). This subdomain has been added to Vercel and uses the Vercel DNS CNAME- We have to add a rule in our WAF that rewrites the host header to be that of the hidden subdomain in order for vercel to respond correctly. It fails the SSL handshake otherwise. This also causes problems with things like NextAuth
What it seems we need to do to avoid rewriting the host header is to add our primary domain to Vercel. Vercel wont verify it of course because the domain itself isn't pointed at Vercel, only on that specific route.
Has anyone accomplished this? Or have any ideas on how to proceed?