diff --git a/packages/backend/src/server/ServerService.ts b/packages/backend/src/server/ServerService.ts index 68850d5b46..a320a55cc5 100644 --- a/packages/backend/src/server/ServerService.ts +++ b/packages/backend/src/server/ServerService.ts @@ -85,6 +85,12 @@ export class ServerService implements OnApplicationShutdown { serve: false, }); + const hostname = os.hostname(); + fastify.addHook('onRequest', (request, reply, done) => { + reply.header('x-worker-host', hostname); + done(); + }); + fastify.register(this.apiServerService.createServer, { prefix: '/api' }); fastify.register(this.openApiServerService.createServer); fastify.register(this.fileServerService.createServer);