From 7530795b04911e1455f64daeb8e90cc607c8e932 Mon Sep 17 00:00:00 2001 From: bitbucket Date: Fri, 21 Jun 2024 10:19:59 +0530 Subject: [PATCH] CHANGE_ added cors : GWM --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 7533bd6..bd06017 100644 --- a/index.js +++ b/index.js @@ -10,6 +10,10 @@ const swaggerUI = require('swagger-ui-express'); const SWAGGERENDPOINT = process.env.SWAGGERENDPOINT; +// Enable CORS for all routes +const cors = require('cors'); +app.use(cors()); + app.set('views', path.join(__dirname, 'app\\views')); app.set('view engine', 'ejs'); app.use(express.static(path.join(__dirname, 'storage/css')));