Interesting! This rings a faint bell that I can’t quite place at the moment. But I guess my first question is where and why is Discourse setting the content-encoding header to null?
This does indeed seem to be a “development-only” issue. This looks related