show not allowed list

This commit is contained in:
Andras Bacsai 2022-09-06 10:43:59 +02:00
parent 26e4d52a61
commit 8f14fd89ef

View File

@ -110,10 +110,8 @@ fastify.addHook('onRequest', async (request, reply) => {
allowedList.push(`${remote.remoteIpAddress}:3000`);
})
}
console.log({ allowedList })
console.log({ host: request.headers.host, origin: request.headers.origin })
if (!request.headers.origin && !request.headers.host.startsWith('host.docker.internal')) {
if (!allowedList.includes(request.headers.host)) {
console.log('not allowed', request.headers.host)
}
})
fastify.listen({ port, host }, async (err: any, address: any) => {