Fixes and upgrades (logging in / CORS headers expose / registering)

This commit is contained in:
2020-08-09 17:50:03 +02:00
parent 91cba76bff
commit 65939f314f
5 changed files with 23 additions and 42 deletions

View File

@@ -16,7 +16,7 @@ export default ({ app, secret }) => {
max: 100, //requests from a single IP for a time window
});
app.use(cors());
app.use(cors({ exposedHeaders: "x-auth-token" }));
app.use(helmet());
app.use(limiter);
app.use(bodyParser.json({ limit: "100kb" })); // limit JSON body payload size