PrivacyScore / privacyscanner

Privacyscanner is the new scanning backend component of a future PrivacyScore version
MIT License
20 stars 11 forks source link

Add option to save request and response headers #6

Closed malexmave closed 5 years ago

malexmave commented 5 years ago

Some use cases require getting access to request and response headers of page loads. This PR adds that feature. To enable it, set your SCAN_MODULE_OPTIONS in your config file to include 'RequestsExtractor.saveHeaders': True for the chromedevtools scan module. Minimal config example:

SCAN_MODULE_OPTIONS = {'chromedevtools': {'RequestsExtractor.saveHeaders': True}}

This PR also fixes a problem with loading a config file using the --config file.py option, where the scanner would crash due to a missing cast of the parameter string to a Path object.

hprid commented 5 years ago

Thank you for your pull request. Here are some remarks regarding the changes:

After reworking your pull request should include two commits (config_file fix + RequestExtractors.save_headers option) that I will happily rebase into master.

malexmave commented 5 years ago

Thanks for the feedback. I rebased and squashed the relevant commits and changed the parameter name.