logicp 6 年之前
父節點
當前提交
ce84ba8052
共有 1 個文件被更改,包括 7 次插入7 次删除
  1. 7 7
      src/server/index.js

+ 7 - 7
src/server/index.js

@@ -98,13 +98,13 @@ app.listen(3002)
 //   res.end();
 // });
 
-app.all('*', function(req, res, next) {
-  if (whitelist.indexOf(req.headers.origin) >= 0){
-      res.header("Access-Control-Allow-Origin", req.headers.origin);
-  }
-  res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
-  next();
-})
+// app.all('*', function(req, res, next) {
+//   if (whitelist.indexOf(req.headers.origin) >= 0){
+//       res.header("Access-Control-Allow-Origin", req.headers.origin);
+//   }
+//   res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
+//   next();
+// })
 
 database.sync().then(() => {
     console.log(`Listening on port ${3002}`);