Merge pull request #78 from MisskeyIO/readd-x-worker-host
x-worker-host を復活させる
This commit is contained in:
commit
caac7b6b24
|
@ -85,6 +85,12 @@ export class ServerService implements OnApplicationShutdown {
|
||||||
serve: false,
|
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.apiServerService.createServer, { prefix: '/api' });
|
||||||
fastify.register(this.openApiServerService.createServer);
|
fastify.register(this.openApiServerService.createServer);
|
||||||
fastify.register(this.fileServerService.createServer);
|
fastify.register(this.fileServerService.createServer);
|
||||||
|
|
Loading…
Reference in a new issue