zulip/requirements
Alex Vandiver cc9b028312 uploads: Set X-Accel-Redirect manually, without using django-sendfile2.
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/
2023-01-09 18:23:58 -05:00
..
README.md requirements: Remove unused mypy.txt lock file. 2022-09-08 11:08:06 -07:00
common.in uploads: Set X-Accel-Redirect manually, without using django-sendfile2. 2023-01-09 18:23:58 -05:00
dev.in dependencies: Upgrade JavaScript dependencies. 2022-12-07 09:55:05 -08:00
dev.txt uploads: Set X-Accel-Redirect manually, without using django-sendfile2. 2023-01-09 18:23:58 -05:00
docs.in Upgrade Python requirements. 2023-01-04 11:08:56 -08:00
docs.txt Upgrade Python requirements. 2023-01-04 11:08:56 -08:00
mypy.in requirements: Upgrade Python requirements. 2022-11-03 14:08:58 -07:00
pip.in requirements: Upgrade Python requirements. 2021-05-07 22:42:39 -07:00
pip.txt requirements: Upgrade Python requirements. 2022-12-04 22:11:24 -08:00
prod.in
prod.txt uploads: Set X-Accel-Redirect manually, without using django-sendfile2. 2023-01-09 18:23:58 -05:00

README.md

The dependency graph of the requirements is as follows:

dev +-> prod +-> common
+
|
v
docs,pip

Of the files, only dev and prod have been used in the install scripts directly. The rest are implicit dependencies.

Steps to update a lock file, e.g. to update ipython from 5.3.0 to latest version:

  1. Remove entry for ipython==5.3.0 in dev.txt.
  2. Run ./tools/update-locked-requirements, which will generate new entries, pinned to the latest version.
  3. Increase PROVISION_VERSION in version.py.
  4. Run ./tools/provision to install the new deps and test them.
  5. Commit your changes.