mirror of https://github.com/zulip/zulip.git
cc9b028312
The `django-sendfile2` module unfortunately only supports a single `SENDFILE` root path -- an invariant which subsequent commits need to break. Especially as Zulip only runs with a single webserver, and thus sendfile backend, the functionality is simple to inline. It is worth noting that the following headers from the initial Django response are _preserved_, if present, and sent unmodified to the client; all other headers are overridden by those supplied by the internal redirect[^1]: - Content-Type - Content-Disposition - Accept-Ranges - Set-Cookie - Cache-Control - Expires As such, we explicitly unset the Content-type header to allow nginx to set it from the static file, but set Content-Disposition and Cache-Control as we want them to be. [^1]: https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile/ |
||
---|---|---|
.. | ||
jinja2 | ||
__init__.py | ||
backends.py | ||
computed_settings.py | ||
config.py | ||
configured_settings.py | ||
default_settings.py | ||
dev_settings.py | ||
dev_urls.py | ||
email_backends.py | ||
legacy_urls.py | ||
prod_settings.pyi | ||
prod_settings_template.py | ||
sentry.py | ||
settings.py | ||
settings_types.py | ||
template_loaders.py | ||
test_extra_settings.py | ||
test_settings.py | ||
urls.py | ||
wsgi.py |