add body-parser middleware to server
parent
8b0a2e7f93
commit
8e2c1c1b28
|
@ -1,6 +1,6 @@
|
|||
import express from 'express';
|
||||
import bodyParser from 'body-parser';
|
||||
import helmet from 'helmet';
|
||||
import { promises as fs } from 'fs';
|
||||
import { Server as HTTPServer } from 'http';
|
||||
import { Collection, ServerManagement, Route } from '.';
|
||||
|
||||
|
@ -51,6 +51,7 @@ export default class Server {
|
|||
|
||||
public init() {
|
||||
this.app.set('trust proxy', 'loopback');
|
||||
this.app.use(bodyParser.json());
|
||||
this.app.use(helmet({
|
||||
hsts: false,
|
||||
hidePoweredBy: false,
|
||||
|
|
Loading…
Reference in New Issue