Disable or Customize GitHub Integration Preview URLs on Workers (avoid *.workers.dev)
Hi,
I recently migrated from Cloudflare Pages to Cloudflare Workers, and I'm running into an issue with the preview URLs generated through the GitHub integration.
I've already disabled the default
*.workers.dev
domain by turning off the Preview URLs (*-[project].[user].workers.dev) and only left my custom domain ([my_domain]) active.
However, when the GitHub integration deploys previews (e.g. pull request previews), it still creates URLs like:
I do not want any *.workers.dev URLs, even for previews. Ideally, I'd like the preview to use a subdomain of my own domain, like:
Is there any way to:
- Prevent Workers GitHub integration from creating *.workers.dev URLs entirely?
- Or at least configure preview URLs to use my own domain?
Thanks in advance!2 Replies
Hi 👋 According to
https://developers.cloudflare.com/workers/configuration/previews/ Preview URLs
can currently only be setup on the
workers.dev
domain, i.e. there's no support
for previews on custom domains yet. I'd love for that to be supported too though 👍Cloudflare Docs
Preview URLs
Preview URLs allow you to preview new versions of your project without deploying it to production.
Interesting. Thanks for the docs link.
Tbh, I was hoping at the very least to able to remove the
WORKER_NAME
from <VERSION_PREFIX>-<WORKER_NAME>.<SUBDOMAIN>.workers.dev