Add CORS to Server.
This commit is contained in:
10
server.js
10
server.js
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user