-
Notifications
You must be signed in to change notification settings - Fork 95
feat(cloudflare): add Workers.DevUrl and Workers.DevDomain bindings #928
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
base: main
Are you sure you want to change the base?
Conversation
commit: |
🚀 Website Preview DeployedYour website preview is ready! Preview URL: https://d8fabe19-alchemy-website.alchemy-run.workers.dev This preview was built from commit 670cd79 🤖 This comment will be updated automatically when you push new commits to this PR. |
|
A few questions:
|
|
Good idea from @Mkassabov, why not just bundle it with other data into a single always-available binding. type MEtadata = {
url: string;
devDomain: string;
commit: string;
appName: string;
stage: string;
scope: string[];
// .. what else?
} |
a3a4abd to
1eeb802
Compare
|
From Discord, I'd like to have a stable URL across all environments to rely on.
I naturally expected that https://alchemy.run/providers/cloudflare/worker/#self-binding would give me a reference back to But, now I understand that it's a binding to itself ( I cannot |


A Worker by default is allocated a
workers.devsubdomain computed from its name and your account's worker subdomain.E.g.
Use the
Worker.DevDomainandWorker.DevUrlbindings to inject a Worker's own subdomain or URL into its script.