Dotos 8 anos atrás
pai
commit
904463cee5
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      app.js

+ 3 - 3
app.js

@@ -38,9 +38,9 @@ app.disable('x-powered-by');
 //app.use(bodyParser.raw({ type: '*/*' }));
 app.use(function(req, res, next) {
     // 设置跨域头
-    res.header("Access-Control-Allow-Origin", "*");
-    res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept,Access-Control-Allow-Origin");
-    res.header("Access-Control-Allow-Methods", "PUT,POST,GET,DELETE,OPTIONS");
+    // res.header("Access-Control-Allow-Origin", "*");
+    // res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept,Access-Control-Allow-Origin");
+    // res.header("Access-Control-Allow-Methods", "PUT,POST,GET,DELETE,OPTIONS");
 
     /***
      * 处理OPTIONS请求