This does not work as expected. We should not attempt to be clever here.
Varnish will do the right thing if we just teach Pleroma to set headers
properly for content we know can be cached.
The built-in nginx default does not allow users to upload images
larger than 1 MB. This increases the maximum request size to match
the default Pleroma config upload_limit parameter. Some helpful
comments were also added.