Description
Is your feature request related to a problem? Please describe.
To enhance data integrity verification in pygeoapi responses, we should consider adding the Content-Digest header. This would allow clients to validate that the response body has not been tampered with during transmission.
Describe the solution you'd like
I have a working implementation that takes the Want-Content-Digest
and returns the corresponding digest as supported. This is included in a similar way that the apply_gzip
function is implemented. I think this could similarly be configurable as gzip
, however not sure what the server config would want to specify (acceptable digest methods, sending digest without it being requested).
Describe alternatives you've considered
I know this may be applied in an upstream webserver. To do so in nginx would require custom njs. Similar to gzip I still think this is a functionality that is important to be a part of pygeoapi.
Additional context
It would be interesting to think of a plugin oriented structure to apply the changes to header and content that we are making with gzip and content integrity to pygeoapi responses. Not sure what this would look like.