diff options
| author | cjd24 | 2018-04-23 08:43:10 +0100 |
|---|---|---|
| committer | cjd24 | 2018-04-23 08:43:10 +0100 |
| commit | f1e8003fd621a40e2386c310a2189bb9a13b0c9d (patch) | |
| tree | a0323aa44d4e9ee87bc9b5fb98e769c4af79265d /src/app.ts | |
| parent | Add tabular functionality (except cols) (diff) | |
| download | medicine-f1e8003fd621a40e2386c310a2189bb9a13b0c9d.tar.gz medicine-f1e8003fd621a40e2386c310a2189bb9a13b0c9d.zip | |
BIG FILTHY COMMIT OF SCARY STUFF
Diffstat (limited to 'src/app.ts')
| -rw-r--r-- | src/app.ts | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -82,6 +82,12 @@ 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 @@ -110,7 +116,7 @@ class App { defRouter.get('/', (req: ex.Request, res: ex.Response): void => { res.json({ message: 'Welcome to the CS3099 BE4 server!', - important: 'Endpoints start from /cs3099group-be-4/' + important: 'Endpoints start from /cs3099group-be-4' }); }); this.express.use('/cs3099group-be-4', FileRouter); @@ -123,7 +129,7 @@ class App { .json({ status: 'error', error : 'invalid_route', - error_description: 'Endpoints start from /cs3099group-be-4/' + error_description: 'Endpoints start from /cs3099group-be-4' }); } else { next(); |
