From 6dda3ae3288e7d57b3157007817d14ed6da983ff Mon Sep 17 00:00:00 2001 From: cjd24 Date: Mon, 23 Apr 2018 15:28:46 +0100 Subject: PANIC COMMITS OMMGGGGG --- src/app.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/app.ts') diff --git a/src/app.ts b/src/app.ts index 7b398fd..7270149 100644 --- a/src/app.ts +++ b/src/app.ts @@ -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 -- cgit v1.2.1