Replies: 1 comment
-
Here's a practical example I want to have 3 Vercel sites running: website.com (www.website.com) and want to have the following routes: website.com/app => app.website.com My problem is when I have aliases for CI/CD or branches For example, for PR#222 I have: pr-222.website.com so I want to rewrite pr-222.website.com/api => pr-222-api.website.com But I found no other solution than a nextjs proxy deployment (which doesn't work as of right now), since the "has" syntax is not supported with a normal vercel.json's rewrite. |
Beta Was this translation helpful? Give feedback.
-
Nextjs has support for the
has
syntax: https://nextjs.org/docs/api-reference/next.config.js/rewrites#header-cookie-and-query-matchingWhile vercel's rewrites does not: https://vercel.com/docs/configuration#project/rewrites
This is a weird state of things IMO since you need to spin up a nextjs deployment to act as a proxy.
We should be able to do
P.S. the
(?<subdomain>dev|master|pr-\\d+).website.com
does not work.. right now (the :subdomain does not get replaced) in nextjs, if someone has any thoughts...Beta Was this translation helpful? Give feedback.
All reactions