Skip to content

Commit

Permalink
feat(app-service): remove CORS in app;
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Nov 12, 2021
1 parent a210253 commit 3e29e95
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions packages/app-service/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author: Maslow<wangfugen@126.com>
* @Date: 2021-07-30 10:30:29
* @LastEditTime: 2021-11-09 19:09:30
* @LastEditTime: 2021-11-12 14:55:11
* @Description:
*/

Expand Down Expand Up @@ -35,17 +35,6 @@ process.on('uncaughtException', err => {
logger.error(`Caught uncaughtException:`, err)
})

/**
* Allow CORS by default
*/
app.all('*', function (_req, res, next) {
res.header('Access-Control-Allow-Origin', '*')
res.header('Access-Control-Allow-Headers', 'Authorization, Content-Type')
res.header('Access-Control-Allow-Methods', '*')
res.header('X-Powered-By', 'LaF Server')
next()
})

/**
* Parsing bearer token
*/
Expand Down

0 comments on commit 3e29e95

Please sign in to comment.