ggshield
ggshield copied to clipboard
Move Files.extra_headers to extra_headers module
Description
The Files class currently has an extra_headers property whose job is to add the GGShield-Version
and GGShield-Command-Path
HTTP headers.
This property should not be part of the Files class: it is not specific to Files instances (has can be noticed by the fact that it does not use its self
argument) and could be used in other situations.
The iac_scan() function has a copy of this code. It should be factorized.
TODO
- [ ] Implement the work done by this property in the
get_extra_headers()
function of thecore.extra_headers
module. - [ ] Remove the property.
- [ ] Make
iac_scan()
useget_extra_headers()
.