Add CORS to Server.

This commit is contained in:
Patrick Fic
2021-10-13 14:01:59 -07:00
parent 404ade396c
commit 57d9de469a

View File

@@ -45,7 +45,15 @@ app.use(cookieParser());
app.use(bodyParser.json({ limit: "50mb" }));
app.use(bodyParser.urlencoded({ limit: "50mb", extended: true }));
//app.use(enforce.HTTPS({ trustProtoHeader: true }));
app.use(cors());
app.use(
cors({
origin: [
"https://test.imex.online",
"http://localhost:3000",
"https://imex.online",
],
})
);
//Email Based Paths.
var sendEmail = require("./server/email/sendemail.js");