Skip to content
Snippets Groups Projects
Commit 80b81c3a authored by Richard Fernando Heise Ferreira's avatar Richard Fernando Heise Ferreira Committed by Stephanie Briere Americo
Browse files

Issue #69: Fix Add CORS

parent f3e001e0
Branches
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
import * as bodyParser from "body-parser"; import * as bodyParser from "body-parser";
import * as express from "express"; import * as express from "express";
const cors = require("cors"); const cors = require('cors');
// Create a new express app // Create a new express app
/** @hidden */ /** @hidden */
...@@ -49,6 +49,7 @@ import { tokenValidation } from "./api/middlewares/userAuth"; ...@@ -49,6 +49,7 @@ import { tokenValidation } from "./api/middlewares/userAuth";
app.use("/", bodyParser.json()); app.use("/", bodyParser.json());
app.use("/", DbHandlerMw()); app.use("/", DbHandlerMw());
app.use(cors()); app.use(cors());
app.use(express.json());
// Setup routes // Setup routes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment