diff options
| author | jw255 | 2018-04-23 15:54:44 +0100 |
|---|---|---|
| committer | jw255 | 2018-04-23 15:54:44 +0100 |
| commit | 64f96157c83c361f9c1cb424751feb2bfd9e5086 (patch) | |
| tree | bb6c69c0c39406d94119de0c9673eddb64bbf766 /src/app.ts | |
| parent | added support for chunking (diff) | |
| parent | merge conflict (diff) | |
| download | medicine-64f96157c83c361f9c1cb424751feb2bfd9e5086.tar.gz medicine-64f96157c83c361f9c1cb424751feb2bfd9e5086.zip | |
Merge branch ‘trh/gets’ of https://gitlab.cs.st-andrews.ac.uk/cs3099group-be-4/project-code into trh/gets
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 |
