Skip to content

Commit

Permalink
Merge pull request #51 from jazicorn/dev
Browse files Browse the repository at this point in the history
updated header options
  • Loading branch information
jazicorn authored Oct 5, 2023
2 parents 9ff5ee4 + f37fc7c commit f5fdfa6
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

1 comment on commit f5fdfa6

@vercel
Copy link

@vercel vercel bot commented on f5fdfa6 Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

recodecamp-api – ./apps/api

recodecamp-api-jazicorn.vercel.app
recodecamp-api.vercel.app
recodecamp-api-git-main-jazicorn.vercel.app

Please sign in to comment.