-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrule.js
More file actions
40 lines (39 loc) · 798 Bytes
/
rule.js
File metadata and controls
40 lines (39 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
module.exports = {
AAA: [
{
'type': 'beforeSendResponse',
'host': '163.com',
'regexp': "/123/v1/(browse|next)",
'callback': async function(url, request, response) {
return {
response
}
} // -- callback
},
{
'type': 'beforeSendResponse',
'host': '163.com',
'regexp': "/456",
'callback': async function(url, request, response) {
return {
response
}
} // -- callback
}
],
BBB: [
{
type: "beforeSendRequest",
host: "163.com",
regexp: "/hello",
callback: async function(url, request, response) {
return {
response : {
statusCode: 200,
body: 'hello world'
}
}
}
}
]
};