Skip to content

Commit

Permalink
REFACT :: CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
gurdl0525 committed Jun 5, 2024
1 parent 7169c2b commit 0143a2f
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0143a2f

Please sign in to comment.