Skip to content

Commit

Permalink
i really don't know
Browse files Browse the repository at this point in the history
  • Loading branch information
rugglcon committed Aug 27, 2019
1 parent 866dd26 commit b558e7d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ class App {
}

config(): void {
this.app.use((_req, res, next) => {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept, Authorization');
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,PATCH,HEAD');
next();
});
this.app.use(cors());
// this.app.use((_req, res, next) => {
// res.header('Access-Control-Allow-Origin', '*');
// res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept, Authorization');
// res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,PATCH,HEAD');
// next();
// });
this.app.use(bodyParser.json());
this.app.use(bodyParser.urlencoded({extended: false}));
this.app.use(passport.initialize());
Expand Down Expand Up @@ -92,7 +93,7 @@ class App {
}

routes(): void {
// this.app.options('*', cors({ credentials: true, origin: true }));
// this.app.options('*', cors());

/**
* BUDGET ROUTES
Expand Down

0 comments on commit b558e7d

Please sign in to comment.