extender CORS

This commit is contained in:
2020-10-08 15:24:56 +02:00
parent 01a0788003
commit 06699dc43a

View File

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