소스 검색

rm opitons

maguohua1 6 년 전
부모
커밋
44f2b5274e
1개의 변경된 파일1개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 5
      app.js

+ 1 - 5
app.js

@@ -20,11 +20,7 @@ app.all('*', (req, res, next) => {
 	res.header("Access-Control-Allow-Methods", "PUT,POST,GET,DELETE,OPTIONS");
   res.header("Access-Control-Allow-Credentials", true); //可以带cookies
 	res.header("X-Powered-By", 'Express');
-	if (req.method == 'OPTIONS') {
-	  	res.sendStatus(200);
-	} else {
-	    next();
-	}
+	next();
 });
 
 // app.use(Statistic.apiRecord)