ggshield icon indicating copy to clipboard operation
ggshield copied to clipboard

Move Files.extra_headers to extra_headers module

Open agateau-gg opened this issue 2 years ago • 0 comments

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 the core.extra_headers module.
  • [ ] Remove the property.
  • [ ] Make iac_scan() use get_extra_headers().

agateau-gg avatar May 13 '22 14:05 agateau-gg