-
Notifications
You must be signed in to change notification settings - Fork 9.9k
Create 2025-10-23-preview-url-default-behavior #26028
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0702089
Create 2025-10-23-preview-url-default-behavior
dinasaur404 3633500
Rename 2025-10-23-preview-url-default-behavior to 2025-10-23-preview-…
dinasaur404 d34aa6f
Update 2025-10-23-preview-url-default-behavior.mdx
dinasaur404 72b05ce
Update 2025-10-23-preview-url-default-behavior.mdx
dinasaur404 6a18acf
Update 2025-10-23-preview-url-default-behavior.mdx
dinasaur404 5d711f9
Update 2025-10-23-preview-url-default-behavior.mdx
dinasaur404 df36f62
Update 2025-10-23-preview-url-default-behavior.mdx
dinasaur404 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
src/content/changelog/workers/2025-10-23-preview-url-default-behavior.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- | ||
| title: Workers Preview URL default behavior now matches your workers.dev setting | ||
| description: If a Workers Preview URL setting is not explicitly configured, its default behavior will now match the setting of the workers.dev subdomain. | ||
| date: 2025-10-23 | ||
| --- | ||
| We have updated the default behavior for Cloudflare Workers [Preview URLs](/workers/configuration/previews/). **Going forward, if a preview URL setting is not [explicitly configured](/workers/configuration/previews/#toggle-preview-urls-enable-or-disable) during deployment, its default behavior will automatically match the setting of your [`workers.dev` subdomain](/workers/configuration/routing/workers-dev/).** | ||
|
|
||
| This change is intended to provide a more intuitive and secure experience by aligning your preview URL's default state with your `workers.dev` configuration to prevent cases where a preview URL might remain public even after you disabled your `workers.dev` route. | ||
|
|
||
| **What this means for you:** | ||
| - **If neither setting is configured:** both the workers.dev route and the preview URL will default to enabled | ||
| - **If your workers.dev route is enabled and you do not explicitly set Preview URLs to enabled or disabled:** Preview URLs will default to enabled | ||
| - **If your workers.dev route is disabled and you do not explicitly set Preview URLs to enabled or disabled:** Preview URLs will default to disabled | ||
|
|
||
| You can override the default setting by explicitly enabling or disabling the preview URL in your Worker's configuration through the [API](/api/resources/workers/subresources/scripts/subresources/subdomain/), [Dashboard](/workers/configuration/previews/#from-the-dashboard), or [Wrangler](/workers/configuration/previews/#from-the-wrangler-configuration-file). | ||
|
|
||
| **Wrangler Version Behavior** | ||
|
|
||
| The default behavior depends on the version of Wrangler you are using. This new logic applies to the latest version. Here is a summary of the behavior across different versions: | ||
| - **Before v4.34.0:** Preview URLs defaulted to enabled, regardless of the workers.dev setting. | ||
| - **v4.34.0 up to the latest version:** Preview URLs defaulted to disabled, regardless of the workers.dev setting. | ||
| - **Latest version:** Preview URLs now default to matching your workers.dev setting. | ||
|
|
||
| **Why we’re making this change** | ||
|
|
||
| In July, [we introduced preview URLs to Workers](/changelog/2025-07-23-workers-preview-urls/), which let you preview code changes before deploying to production. This made disabling your Worker’s workers.dev URL an ambiguous action — the preview URL, served as a subdomain of `workers.dev` (ex: `preview-id-worker-name.account-name.workers.dev`) would still be live even if you had disabled your Worker’s `workers.dev` route. If you misinterpreted what it meant to disable your `workers.dev` route, you might unintentionally leave preview URLs enabled when you didn’t mean to, and expose them to the public Internet. | ||
|
|
||
| To address this, we made a [one-time update](/changelog/2025-09-17-update-preview-url-setting/) to disable preview URLs on existing Workers that had their workers.dev route disabled and changed the default behavior to be disabled for all new deployments where a preview URL setting was not explicitly configured. | ||
|
|
||
| While this change helped secure many customers, it was disruptive for customers who keep their `workers.dev` route enabled and actively use the preview functionality, as it now required them to explicitly enable preview URLs on every redeployment.This new, more intuitive behavior ensures that your preview URL settings align with your `workers.dev` configuration by default, providing a more secure and predictable experience. | ||
|
|
||
| **Securing access to `workers.dev` and preview URL endpoints** | ||
|
|
||
| To further secure your `workers.dev` subdomain and preview URL, you can [enable Cloudflare Access with a single click](/changelog/2025-10-03-one-click-access-for-workers/) in your Worker's settings to limit access to specific users or groups. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.