This commit is contained in:
Andras Bacsai 2022-09-06 09:42:13 +02:00
parent 1f73b83a79
commit bdf9a73d19

View File

@ -99,7 +99,7 @@ fastify.register(cors);
fastify.addHook('onRequest', async (request, reply) => {
console.log({ host: request.headers.host, origin: request.headers.origin })
if (!request.headers.origin && !request.headers.host.startsWith('host.docker.internal')) {
throw new Error('Invalid origin');
}
})
fastify.listen({ port, host }, async (err: any, address: any) => {