I'm evaluating ZAP and followed the guide: https://zaproxy.blogspot.ru/2017/04/exploring-apis-with-zap.html
But cannot find a way how to set header parameters in the UI, for example api key.
I'm evaluating ZAP and followed the guide: https://zaproxy.blogspot.ru/2017/04/exploring-apis-with-zap.html
But cannot find a way how to set header parameters in the UI, for example api key.
You could use the Replacer addon: https://www.zaproxy.org/docs/desktop/addons/replacer/
Or a script. Here's a python scripting example:
headers = dict({"X-MIP-ACCESS-TOKEN": "XXXXXxXX-xxXX-XXXx-xxxX-XXxxXxXXxXxX",
"X-MIP-CHANNEL": "ANDROID",
"X-MIP-Device-Id": "1",
"X-MIP-APP-VERSION": "1.0.1",
"X-MIP-APP-VERSION-ID": "1"});
def sendingRequest(msg, initiator, helper):
for x in list(headers):
msg.getRequestHeader().setHeader(x, headers[x]);
def responseReceived(msg, initiator, helper):
pass;
You can find other examples in the community-scripts repo: https://github.com/zaproxy/community-scripts
You can get the Replacer add-on or python scripting add-on via the ZAP Marketplace:
