What is the workers equivalent of the CF_PAGES_URL env var for Pages builds?
For preview builds I need to pass the preview URL to my static site build. Cloudflare Pages has the CF_PAGES_URL env var exposed during the build. What is the Cloudflare workers equivalent? If this doesn't exist, what is the ETA of this being available?
For context I compared the below docs and see that there isn't an equivalent for workers.
https://developers.cloudflare.com/pages/configuration/build-configuration/#environment-variables
https://developers.cloudflare.com/workers/ci-cd/builds/configuration/#environment-variables
Cloudflare Docs
Build configuration
You may tell Cloudflare Pages how your site needs to be built as well as where its output files will be located.
1 Reply
Related issue I created a while back -- https://github.com/cloudflare/workers-sdk/issues/7547
GitHub
🚀 Feature Request: Get worker domain/url at build time · Issue ...
Describe the solution Similar to #2410, when we are building a worker, sometimes we want to know the URL of where it will be deployed while building it. For production cases the main URL will be kn...