x-worker-host を復活させる

This commit is contained in:
riku6460 2023-04-09 19:49:37 +09:00
parent b69075388c
commit 89f4e8f14d
No known key found for this signature in database
GPG Key ID: 27414FA27DB94CF6

View File

@ -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);