randydev commited on
Commit
9502566
·
verified ·
1 Parent(s): 2be17ce

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +1 -7
index.js CHANGED
@@ -76,13 +76,7 @@ const allowedOrigins = [
76
  ];
77
 
78
  app.use(cors({
79
- origin: (origin, callback) => {
80
- if (allowedOrigins.includes(origin)) {
81
- callback(null, true);
82
- } else {
83
- callback(new Error('Not allowed by CORS'));
84
- }
85
- },
86
  methods: ['GET', 'POST'],
87
  allowedHeaders: ['Content-Type', 'Authorization', 'x-api-key'],
88
  credentials: true,
 
76
  ];
77
 
78
  app.use(cors({
79
+ origin: "*",
 
 
 
 
 
 
80
  methods: ['GET', 'POST'],
81
  allowedHeaders: ['Content-Type', 'Authorization', 'x-api-key'],
82
  credentials: true,