Basically in worker editor all seems great, but if I try to access asset url (https://assets.domain/some_picture.png) outside of editor I get 403 and worker dashboard doesn’t register invocation.
seeing a 403 means that the origin doesn’t allow that action, but if it works for the same URL in the preview that shouldn’t be the issue. The 403 is never generated by Cloudflare, but by the origin.
not having the invocation seen on the dashboard (note that there is a delay in that) suggest that something is wrong with the configuration of the routes (if the code were wrong the error would be different).
I’m kinda at a loss here. I am gonna think about that, but maybe in the meantime let’s see if @cloonan or @KentonVarda have ideas.
Thanks for help.
I’ve figured out what was going on. The problem wasn’t in routing or in script.
I have 3 levels domain (assets.server.domain.com), but Cloudflare provide free ssl certificate only for first and second level. Browser just failed to establish https connection ans cancel requests. That’s why I haven’t seen worker requests in dashboard (or I believe so).
Basically removing one level (e.g. assets.server -> assets-server or something) fixed the issue.