fix
This commit is contained in:
parent
1f73b83a79
commit
bdf9a73d19
@ -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) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user