randydev commited on
Commit
a7b9a55
·
verified ·
1 Parent(s): 4cf7c92

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +5 -0
index.js CHANGED
@@ -19,6 +19,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
19
  */
20
 
21
  import express from 'express';
 
22
  const app = express();
23
 
24
  import * as swaggerUi from 'swagger-ui-express';
@@ -73,6 +74,10 @@ app.use(async (req, res, next) => {
73
  });
74
  // app.use(helmet({ dnsPrefetchControl: false }));
75
 
 
 
 
 
76
  app.use("/api/v1/", apiLimiter);
77
  app.use(bodyParser.json());
78
  app.use(express.static('public'));
 
19
  */
20
 
21
  import express from 'express';
22
+ import cors from 'cors';
23
  const app = express();
24
 
25
  import * as swaggerUi from 'swagger-ui-express';
 
74
  });
75
  // app.use(helmet({ dnsPrefetchControl: false }));
76
 
77
+ app.use(cors({
78
+ origin: 'https://*.hf.space'
79
+ }));
80
+
81
  app.use("/api/v1/", apiLimiter);
82
  app.use(bodyParser.json());
83
  app.use(express.static('public'));