Accessing assets between different versions of the same worker

I have a worker which is deploying both a PWA web application (using static assets) and a small worker that I am using for routing purposes. I also have a custom domain for my entire application (ex. myapp.com) I want to be able to control which customer is using which version of the application. For that reason, the web application is setting a certain version header in the request for resources to the web worker. If the web worker that was hit is the one of the indicated version, it would simply return the requested assets (await env.ASSETS.fetch(request)); if the assets should be returned from another version, I am trying to perform a fetch (from within the worker) to the correct version of the same worker (using the preview url). This one always fails with a 404. Trying to reach the URL of the other version from outside of the worker, it works. Any thoughts how I could achieve this? Thanks!
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?