backend/src/loaders/express.ts
Nicolai Ort 19422edbae
All checks were successful
continuous-integration/drone/pr Build is passing
Disabled the x-served-by and x-powered-by Headers
ref #41
2020-12-21 17:48:04 +01:00

14 lines
391 B
TypeScript

import cookieParser from "cookie-parser";
import { Application } from "express";
/**
* Loader for express related configurations.
* Configures proxy trusts, globally used middlewares and other express features.
*/
export default async (app: Application) => {
app.enable('trust proxy');
app.disable('x-powered-by');
app.disable('x-served-by');
app.use(cookieParser());
return app;
};