Added cookie-parser to app.use

ref #25
This commit is contained in:
Nicolai Ort 2020-12-12 19:01:31 +01:00
parent db5da3d3c2
commit c07d40ae93
2 changed files with 4 additions and 2 deletions

View File

@ -28,6 +28,7 @@
"class-validator": "^0.12.2",
"class-validator-jsonschema": "^2.0.3",
"consola": "^2.15.0",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"express": "^4.17.1",
@ -82,4 +83,4 @@
],
"delay": "2500"
}
}
}

View File

@ -1,10 +1,11 @@
import cookieParser from "cookie-parser";
import { Application } from "express";
/**
* Loader for express related configurations.
* Currently only enables the proxy trust.
*/
export default async (app: Application) => {
app.enable('trust proxy');
app.use(cookieParser());
return app;
};