mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-23 16:01:26 +00:00
update doc
This commit is contained in:
parent
87167ab01d
commit
bed132d7c5
@ -1,4 +1,8 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
|
summary:function(){
|
||||||
|
console.log("this is the default rule for anyproxy, which supports CORS request");
|
||||||
|
},
|
||||||
|
|
||||||
shouldUseLocalResponse : function(req,reqBody){
|
shouldUseLocalResponse : function(req,reqBody){
|
||||||
//intercept all options request
|
//intercept all options request
|
||||||
if(req.method == "OPTIONS"){
|
if(req.method == "OPTIONS"){
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "anyproxy",
|
"name": "anyproxy",
|
||||||
"version": "2.1.1",
|
"version": "2.1.2",
|
||||||
"description": "a charles/fiddler like proxy written in NodeJs, which can handle HTTPS requests and CROS perfectly.",
|
"description": "a charles/fiddler like proxy written in NodeJs, which can handle HTTPS requests and CROS perfectly.",
|
||||||
"main": "proxy.js",
|
"main": "proxy.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
@ -19,7 +19,7 @@
|
|||||||
"iconv-lite": "^0.4.4"
|
"iconv-lite": "^0.4.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"tunnel": "0.0.3"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "nodeunit test.js"
|
"test": "nodeunit test.js"
|
||||||
|
@ -2,6 +2,9 @@ module.exports = {
|
|||||||
/*
|
/*
|
||||||
these functions will overwrite the default ones, write your own when necessary.
|
these functions will overwrite the default ones, write your own when necessary.
|
||||||
*/
|
*/
|
||||||
|
summary:function(){
|
||||||
|
console.log("this is a blank rule for anyproxy");
|
||||||
|
},
|
||||||
|
|
||||||
//whether to intercept this request by local logic
|
//whether to intercept this request by local logic
|
||||||
//if the return value is true, anyproxy will call dealLocalResponse to get response data and will not send request to remote server anymore
|
//if the return value is true, anyproxy will call dealLocalResponse to get response data and will not send request to remote server anymore
|
||||||
|
Loading…
x
Reference in New Issue
Block a user