From e0a678d4218583cf569b9d93945ccf559f004f49 Mon Sep 17 00:00:00 2001 From: marcos parajua Date: Sun, 19 May 2024 21:49:55 +0200 Subject: [PATCH] add cors origin configuration --- src/app.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app.ts b/src/app.ts index 2217824..7ed53b4 100644 --- a/src/app.ts +++ b/src/app.ts @@ -24,7 +24,12 @@ export const startApp = (app: Express, prisma: PrismaClient) => { debug('Starting app'); app.use(express.json()); app.use(morgan('dev')); - app.use(cors()); + app.use( + cors({ + origin: 'https://hyph4e.netlify.app/', + credentials: true, + }) + ); app.use(express.static('public')); const authInterceptor = new AuthInterceptor();