From f94ffe70ab812bbaac32416be98c3b3ded71e9d7 Mon Sep 17 00:00:00 2001 From: danielcampagnolitg <138441775+danielcampagnolitg@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:24:08 +0800 Subject: [PATCH] Add accounts.google.com to cors --- src/fastify/fastifyApp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fastify/fastifyApp.ts b/src/fastify/fastifyApp.ts index 5c5e7f22..5c25f160 100644 --- a/src/fastify/fastifyApp.ts +++ b/src/fastify/fastifyApp.ts @@ -104,7 +104,7 @@ function listen(port: number): void { async function loadPlugins(config: FastifyConfig) { await fastifyInstance.register(import('@fastify/cors'), { - origin: new URL(process.env.UI_URL).origin, + origin: [new URL(process.env.UI_URL).origin, 'accounts.google.com'], methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'], // Allow these HTTP methods allowedHeaders: ['Content-Type', 'Authorization'], // Allow these headers credentials: true,