Sitelet https://github.com/alibaba/anyproxy/commit/bed132d7c5feac085181acc285f776c3c9ef928c
Skip to content

Commit bed132d

Browse files
author
加里
committed
update doc
1 parent 87167ab commit bed132d

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎lib/rule_default.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
module.exports = {
2+
summary:function(){
3+
console.log("this is the default rule for anyproxy, which supports CORS request");
4+
},
5+
26
shouldUseLocalResponse : function(req,reqBody){
37
//intercept all options request
48
if(req.method == "OPTIONS"){

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "anyproxy",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"description": "a charles/fiddler like proxy written in NodeJs, which can handle HTTPS requests and CROS perfectly.",
55
"main": "proxy.js",
66
"bin": {
@@ -19,7 +19,7 @@
1919
"iconv-lite": "^0.4.4"
2020
},
2121
"devDependencies": {
22-
"tunnel": "0.0.3"
22+
2323
},
2424
"scripts": {
2525
"test": "nodeunit test.js"

‎rule_sample/rule__blank.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ module.exports = {
22
/*
33
these functions will overwrite the default ones, write your own when necessary.
44
*/
5+
summary:function(){
6+
console.log("this is a blank rule for anyproxy");
7+
},
58

69
//whether to intercept this request by local logic
710
//if the return value is true, anyproxy will call dealLocalResponse to get response data and will not send request to remote server anymore

0 commit comments

Comments
 (0)