update request url with workers static assets
seems like this should be simple, but I can't find any examples. Say I'm using workers static assets, and I have enabled run_worker_first. It seems that
env.ASSETS.fetch
wants the incoming request passed through - but what if I want to change which file gets fetched?
5 Replies
env.ASSETS.fetch('https://assets.local/b.html);
ok great - I figured there must be an easy way, but could not find anything in the docs or examples anywhere
can you just put any hostname in there? like example.com, and google.com, and it'll work the same...?
that's how it seems to be working in my testing so far, which is very surprising behavior to me
yes
It just needs a hostname
But the hostname isn't used so it can be anything but we still expect a valid url
i assume this is part of the impetus for the unstable “getByPathname” API?