Next.js Discord

Discord Forum

PR previews on Vercel subdomains

Unanswered
Red-whiskered Bulbul posted this in #help-forum
Open in Discord
Red-whiskered BulbulOP
We're running E2E tests on PR previews. Some of them are testing payments with Adyen's 3DS redirect flow. To use their drop-in or component-based UI solutions we must configure allow origins on Adyen's site, which supports wildcards. We wouldn't want to allow *.vercel.app, but would be happy to allow *.x.vercel.app. Is it possible to access the PR previews of the said custom Vercel subdomain?

14 Replies

Bighead carp
You could set up your own domain, such as preview.mydomain.com, set that domain to the preview branch in vercel, and then accept origins of that subdomain
Red-whiskered BulbulOP
That would be nice, thanks!
How do I set that domain to the preview branch on vercel?
Bighead carp
First, set up the domain in your project settings
Then, go to the Environment Variables tab and click 'Select custom branch'
Red-whiskered BulbulOP
It seems like I need the Preview Deployment Suffix Add-On, for $100/month 😢
@Red-whiskered Bulbul It seems like I need the Preview Deployment Suffix Add-On, for $100/month 😢
Bighead carp
My screenshots are on the hobby plan. Where is it asking you for a preview deployment suffix
Red-whiskered BulbulOP
I thought from the docs that was needed in order to get a pull request preview on that subdomain.

I've set up my subdomain which is assigned to the dev branch. But when I open a PR that targets the dev branch, it doesn't seem to generate a preview url based on it
Bighead carp
Ah okay, maybe thats your answer then
Sorry I couldn't be more help
Red-whiskered BulbulOP
No worries at all, thanks for the replies 🙏
Bighead carp
If you could mark the solution that would be great
Red-whiskered BulbulOP
I would but it isn't the solution to the OP question, right?
@Red-whiskered Bulbul It seems like I need the Preview Deployment Suffix Add-On, for $100/month 😢
You can only assign a custom domain to a branch. To do more you need to pay that $100/mo
Red-whiskered BulbulOP
Yeah, so to be 100%, I need the Preview Deployment Suffix Add-On to be able to have like:

{{previewId}}.previews.mydomain.com?