Problem
fastifyRoutes refuses to load under any host mount (server/fastifyRoutes.ts:43-55). The reason given is that fastify is registered as a global fallback, so its routes would answer on every host.
That reasoning doesn't hold in an isolated application's dedicated worker:
- The worker loads only that application.
- It's reached only through its host's SNI route, so there's no other host for the routes to leak onto.
Isolated applications need a host to be reachable at all (#2757), so today a fastify-based application can't be isolated. Studio's component is one of them.
Proposal
Skip the refusal when the scope's application is this thread's isolated application (thisThreadsIsolatedApplication()). Keep it in shared workers.
Part of #3042.
Problem
fastifyRoutesrefuses to load under anyhostmount (server/fastifyRoutes.ts:43-55). The reason given is that fastify is registered as a global fallback, so its routes would answer on every host.That reasoning doesn't hold in an isolated application's dedicated worker:
Isolated applications need a host to be reachable at all (#2757), so today a fastify-based application can't be isolated. Studio's component is one of them.
Proposal
Skip the refusal when the scope's application is this thread's isolated application (
thisThreadsIsolatedApplication()). Keep it in shared workers.Part of #3042.