From 0143a2f5855faec521f4a50ae63418b1468f15c7 Mon Sep 17 00:00:00 2001 From: kanghyuk Date: Wed, 5 Jun 2024 11:48:39 +0900 Subject: [PATCH] REFACT :: CORS --- src/main.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 849eca2..2e8231f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -21,20 +21,38 @@ async function bootstrap() { origin: ['http://localhost:3000'], methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS', allowedHeaders: [ + 'content-type', 'Content-Type', + 'oa-token', 'OA-TOKEN', + 'content-length', 'Content-Length', + 'x-requested-with', 'X-Requested-With', + 'accept', 'Accept', + 'accept-encoding', 'Accept-Encoding', + 'accept-language', 'Accept-Language', + 'accept-headers', 'Accept-Headers', + 'user-agent', 'User-Agent', + 'host', 'Host', + 'connection', 'Connection', + 'authorization', 'Authorization', ], - exposedHeaders: ['Authorization', 'OA-TOKEN', 'Location'], + exposedHeaders: [ + 'Authorization', + 'authorization', + 'OA-TOKEN', + 'oa-token', + 'Location', + ], }); const port = Number(process.env.PORT);