Multiple assets bindings within a single worker
Hi, is 1 worker restricted to having 1 assets binding? I want to serve up different UIs with different ACLs that I apply in my worker & dispatch based on route dynamically but the
assets
binding in wrangler.json doesn't appear to be an array like other bindings typically are. I understand why that doesn't work when 'run_worker_first' is ever false but certainly when it's true it could be allowed. I just want to double check that this is indeed a limitation of static assets currently.2 Replies
Hey Vitali, yeah right now there's just only 1 "pool" of assets which are scoped for a worker. There would be no benefit to having multiple asset bindings at the moment.
@texan can you elaborate on why there would be no benefit to multiple asset bindings? I have a use-case where I'd like to serve two different bindings with different authorization paths. To accomplish it I need two separate workers via worker bindings & the local wrangler dev story service bindings is not the smoothest.