Skip to content

Commit

Permalink
Merge pull request #28 from EjembiEmmanuel/main
Browse files Browse the repository at this point in the history
fix: fix graphql CORS error
  • Loading branch information
Oshioke-Salaki authored Feb 21, 2025
2 parents a920537 + f6c519e commit a95a180
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ async function bootstrap() {

const corsOptions: CorsOptions = {
origin: '*',
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS',
methods: ['GET', 'HEAD', 'PUT', 'PATCH', 'POST', 'DELETE', 'OPTIONS'],
allowedHeaders: [
'Accept',
'Content-Type',
'X-Requested-With',
'Authorization',
'x-apollo-operation-name',
'apollo-require-preflight',
Expand Down

0 comments on commit a95a180

Please sign in to comment.