Skip to content

Commit c31e394

Browse files
save file
1 parent 5ecfcb6 commit c31e394

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

blog/25-07-24/http-server/ex/http-server-simple-example.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
function request(req,res){
1919
console.log(req.method,req.url);
20+
cors.headers(res);
21+
2022
if(cors(req,res)){
2123
return;
2224
}
@@ -69,8 +71,6 @@
6971

7072
function cors(req,res){
7173

72-
cors.headers(res);
73-
7474
if(req.method!='OPTIONS'){
7575
return;
7676
}

0 commit comments

Comments
 (0)