show not allowed list
This commit is contained in:
parent
26e4d52a61
commit
8f14fd89ef
@ -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) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user