Proposal: Custom response headers for /bzz requests
Summary
I'm not sure if possible, but it would be nice to append custom headers to the response of bzz files.
Motivation
Some web features requires some headers to be set by the server. Since web apps uploaded on Swarm are served by the Swarm server itself, it's not possible to add those headers manually.
For instance, https://github.com/ffmpegwasm/ffmpeg.wasm to work requires this headers to be set to enable SharedArrayBuffer:
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
Another reason might be to change the default Content-Disposition behavior.
Implementation
Right now bee already does something similar for the Content-Type by saving that information in the metadata of 'mantaray node'.
Maybe bee could also read known headers, such as the one mentioned before, and adding those to the response.
Drawbacks
I'm not sure if that could have any security implication. My guess is that if you can do it with a standard server it should not be a problem here also.