diff options
| author | cjd24 | 2018-04-23 15:28:46 +0100 |
|---|---|---|
| committer | cjd24 | 2018-04-23 15:28:46 +0100 |
| commit | 6dda3ae3288e7d57b3157007817d14ed6da983ff (patch) | |
| tree | d50013ed8ff3b224d3eb7c84ff9179c664b7677b /src/app.ts | |
| parent | BIG FILTHY COMMIT OF SCARY STUFF (diff) | |
| download | medicine-6dda3ae3288e7d57b3157007817d14ed6da983ff.tar.gz medicine-6dda3ae3288e7d57b3157007817d14ed6da983ff.zip | |
PANIC COMMITS OMMGGGGG
Diffstat (limited to 'src/app.ts')
| -rw-r--r-- | src/app.ts | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -44,6 +44,12 @@ class App { logger.debug('Constructing router'); this.logEnabled = enableLog; this.express = ex(); + this.express.use((req, res, next) => { + if (req.headers.authorisation) { + (req.headers.authorization as any) = req.headers.authorisation; + } + next(); + }); this.express.use(cors()); this.express.use( (req: ex.Request, res: ex.Response, next: ex.NextFunction): void => { @@ -82,12 +88,6 @@ class App { '/cs3099group-be-4/_supported_protocols_' ] }) ); - this.express.use((req, res, next) => { - if (req.headers.authorisation) { - (req.headers.authorization as any) = req.headers.authorisation; - } - next(); - }) this.express.use(passport.initialize()); this.express.use(async( req: ex.Request, res: ex.Response, next: ex.NextFunction |
