New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access deployed url #1054
Comments
The url is provided as |
Is this in V2 at all? I can't find any reference too it, and it doesn't seem to be in the env vars |
@aequasi you're right that this isn't in V2. Can you make a case for adding it? |
One of my apps has an OAuth flow to it. The callbackUrl is hard-coded to my production alias. Would love for this to support my staging aliases, and possibly multiple aliases per deploy. |
You can use one of these to find the requested URL
In your case (OAuth), I would suggested reading the |
I was able to get mine by using (example) |
This is documented here: https://zeit.co/docs/v2/platform/upgrade-to-2-0#environment-variables |
Up-to-date URL: https://zeit.co/docs/v2/advanced/platform/changes-in-now-2-0#environment-variables (@juliangruber Feel free to delete this comment if you want to update your link.) |
Url is now out of date |
Is there a way to get the deploy URL during build time at the moment? If I want to enable a twitter card with an image for a website, I need to add a meta tag in the head with a full image URL. <meta name="twitter:image" content="https://mysite.com/image.jpg"> Not having a deploy URL at hand makes it pretty hard to test this functionality in a deploy preview. On Netlify I can access the deploy URL via |
I was also looking for this. The way I had it set up in Gridsome + Netlify was: |
I'm also looking for this. We are using jenkins for our CI and deploying to now to run end to end tests against it. Would love it if the url could be accessed from stdout. |
You can get the URL both in Build/Runtime and in your CI/CD:
|
@lucleray In my case, |
If you're going to use system environment variables such as |
|
Hi, is it possible to access to the url (host and port) that’s created when deploying an app to now somehow within the app such as through
process.env
?The text was updated successfully, but these errors were encountered: