zaproxy icon indicating copy to clipboard operation
zaproxy copied to clipboard

Disable cache - deleting cache headers

Open roisec opened this issue 1 year ago • 10 comments

Is your feature request related to a problem? Please describe.

Hi I am trying easily to disable the cache for all the requests. Some requests are cached, and I want to see the complete original response. In burp proxy, there is an easy solution to do that: The cache headers are: If-Modified-Since If-None-Match image

Describe the solution you'd like

Out-of-the-box support to disable cache in ZAP proxy

Describe alternatives you've considered

Using ZAP scripts?

Screenshots

No response

Additional context

No response

Would you like to help fix this issue?

  • [ ] Yes

roisec avatar Apr 10 '24 12:04 roisec

https://www.zaproxy.org/docs/desktop/addons/replacer/

thc202 avatar Apr 10 '24 12:04 thc202

thanks @thc202 Is there any option to set the config using a file? If I would like to use it on CI/CD and load static config for this?

roisec avatar Apr 10 '24 12:04 roisec

You can add Replacer rules via the Web API: https://www.zaproxy.org/docs/api/#replaceractionaddrule

kingthorin avatar Apr 10 '24 12:04 kingthorin

You can use the Automation Framework 😁 https://www.zaproxy.org/docs/automate/automation-framework/ https://www.zaproxy.org/docs/desktop/addons/replacer/automation/

psiinon avatar Apr 10 '24 12:04 psiinon

These could be added as default Replacer rules, however they'd still ship initially disabled. I currently have a PR in-flight that's adding some handling to disable Report-To / Report-Uri after that's dealt with I'd be happy to tackle this. In CI/CD you'd still need to handle them somehow.

kingthorin avatar Apr 10 '24 12:04 kingthorin

Did you close this on purpose? Should we not add rules for this?

kingthorin avatar Apr 11 '24 02:04 kingthorin

Yes, if I able to enable rules automatically on CICD then it would work fine.

roisec avatar Apr 15 '24 19:04 roisec

Well automatically via the API or Automation Framework.

kingthorin avatar Apr 16 '24 11:04 kingthorin

If you are going to do work through the API/AF, you can already add/enable them, no need to wait for default rules.

thc202 avatar Apr 18 '24 16:04 thc202

💯 %

kingthorin avatar Apr 18 '24 17:04 kingthorin

Done in zaproxy/zap-extensions#5413

kingthorin avatar May 09 '24 17:05 kingthorin

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Aug 08 '24 01:08 github-actions[bot]