feat: redirect catch-all rule

This commit is contained in:
Andras Bacsai
2022-11-04 10:50:16 +01:00
parent bf33d6c34e
commit 13c1734753
7 changed files with 68 additions and 10 deletions

View File

@@ -111,12 +111,13 @@ const host = '0.0.0.0';
fastify.register(cors);
fastify.register(socketIO, {
cors: {
origin: "http://localhost:3000"
origin: isDev ? "*" : ''
}
})
// To detect allowed origins
// fastify.addHook('onRequest', async (request, reply) => {
// console.log(request.headers.host)
// let allowedList = ['coolify:3000'];
// const { ipv4, ipv6, fqdn } = await prisma.setting.findFirst({})