Skip to content

Commit

Permalink
updated header options
Browse files Browse the repository at this point in the history
  • Loading branch information
jazicorn committed Oct 5, 2023
1 parent b445055 commit f37fc7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/api/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class App {
}));
this.app.use(bodyParser.json());
this.app.use(cookieParser());
this.app.use(cors({
this.app.options("*", cors({
origin: this.corsOptions,
credentials : true,
methods: 'GET,PUT,POST,DELETE,OPTIONS',
Expand All @@ -43,7 +43,7 @@ class App {
// this.app.options("/", (req, res) => {
// res.setHeader("Access-Control-Allow-Origin", "*");
// res.setHeader("Access-Control-Allow-Methods", "PUT, POST, GET, DELETE, OPTIONS");
// res.setHeader("Access-Control-Allow-Headers", "Content-Type");
// res.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorizatione");
// res.sendStatus(204);
// });
// this.app.set('trust proxy', 1) // trust first proxy
Expand Down

0 comments on commit f37fc7c

Please sign in to comment.