forked from zaproxy/community-scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Remove CSP.zst
58 lines (58 loc) · 1.7 KB
/
Remove CSP.zst
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
"about": "This is a Zest script. For more details about Zest visit https://developer.mozilla.org/en-US/docs/Zest",
"zestVersion": "0.3",
"title": "Remove CSP",
"description": "Remove the Content-Security-Policy header, if present",
"prefix": "",
"type": "Targeted",
"parameters": {
"tokenStart": "{{",
"tokenEnd": "}}",
"tokens": {},
"elementType": "ZestVariables"
},
"statements": [
{
"comment": "Proxy scripts are called for every request and response made through ZAP.\nIf the response.url parameter is null then the script has been called for a response, otherwise it will have been called for a request.\n",
"index": 1,
"elementType": "ZestComment"
},
{
"rootExpression": {
"length": 0,
"approx": 0,
"variableName": "response.url",
"not": false,
"elementType": "ZestExpressionLength"
},
"ifStatements": [
{
"comment": "Called for the request.\nNothing to do.",
"index": 3,
"elementType": "ZestComment"
}
],
"elseStatements": [
{
"comment": "Called for the response.\nRemove the Content-Security-Policy header, if present.",
"index": 6,
"elementType": "ZestComment"
},
{
"replace": "Content-Security-Policy:.*",
"replacement": "Content-Security-Policy:",
"regex": true,
"caseExact": false,
"variableName": "response.header",
"index": 7,
"elementType": "ZestAssignReplace"
}
],
"index": 2,
"elementType": "ZestConditional"
}
],
"authentication": [],
"index": 0,
"elementType": "ZestScript"
}