WC-2972: Allow Workers Assets to be mounted to a path#7476
Conversation
🦋 Changeset detectedLatest commit: 65b102b The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
4981081 to
579af37
Compare
|
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12378030574/npm-package-wrangler-7476You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7476/npm-package-wrangler-7476Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12378030574/npm-package-wrangler-7476 dev path/to/script.jsAdditional artifacts:wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12378030574/npm-package-cloudflare-workers-bindings-extension-7476 -O ./cloudflare-workers-bindings-extension.0.0.0-vd048aae22.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vd048aae22.vsixnpx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12378030574/npm-package-create-cloudflare-7476 --no-auto-updatenpm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12378030574/npm-package-cloudflare-kv-asset-handler-7476npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12378030574/npm-package-miniflare-7476npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12378030574/npm-package-cloudflare-pages-shared-7476npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12378030574/npm-package-cloudflare-unenv-preset-7476npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12378030574/npm-package-cloudflare-vitest-pool-workers-7476npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12378030574/npm-package-cloudflare-workers-editor-shared-7476npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12378030574/npm-package-cloudflare-workers-shared-7476npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12378030574/npm-package-cloudflare-workflows-shared-7476Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
579af37 to
e07bdc0
Compare
|
This is awesome to see, but "masking" is an odd way to describe this feature. "Masking" to me implies a sense of temporary-ness, or fake-ness, vs the industry standard of mounting that you see across lots of different software when you mount files/folders at a specific location, like inside containers. Hopefully the naming is finalised, because "mount" makes way more senses than "mask" in my opinion. |
39dd224 to
d2da9e6
Compare
GregBrimble
left a comment
There was a problem hiding this comment.
Sorry, not strictly related to your change, but before we release this, can we also make sure we have some asset-worker tests which assert that we do not leak out assets for requests like example.com/blog/../home and example.com/blog/%2E%2E/home? If we're saying in the docs that assets like /home.html are not directly accessible, we need to be confident in that.
d2da9e6 to
1b5762a
Compare
1b5762a to
84e08c7
Compare
84e08c7 to
125a8a4
Compare
04c8440 to
7061785
Compare
7061785 to
65b102b
Compare
This commit fixed some e2e tests that started failing after #7476
This commit fixed some e2e tests that started failing after #7476
This commit fixed some e2e tests that started failing after #7476
This commit fixed some e2e tests that started failing after #7476
Fixes WC-2972.
Allow Workers Assets to be mounted to a wildcard path. We are still limiting unwildcarded paths like
example.com/testfor the minute though.We will log a warning saying that we will attempt to serve assets along with the asset dir being matched. Also with a note saying unmatched will go to the Worker

Wording TBD here.