4.1.0
Tip
This release includes some changes to the default behavior of ServeStatic for security hardening. If you are affected by any of these changes, please read the relevant sections in the documentation on allow_unsafe_symlinks.
Added
- Added support for
zstdcompression on Python 3.14+. - Added support for the top-level
servestaticmodule to run as a Django app. - Added Django system checks to test for common misconfigurations.
- Added
allow_unsafe_symlinksconfiguration option for WSGI/ASGI - Added
SERVESTATIC_ALLOW_UNSAFE_SYMLINKSconfiguration option for Django. - Added
jxlimage support.
Changed
- Improved event-loop handling for ASGI file iterator.
- Installing
servestaticas a Django app is now the suggested configuration. A warning will appear if it is not detected inINSTALLED_APPSwhenDEBUGisTrue. servestatic.runserver_nostaticis no longer the recommended Django app installation path. This import path will be retained to easeWhiteNoisetoServeStaticmigration, but now the documentation recommends to use the top-levelservestaticmodule instead.
Fixed
- Fixed a range-request edge case where the last byte could be requested but would not be served.
Security
- Hardened
autorefreshpath matching to prevent potential path traversal or path clobbering. - Hardened static file resolution to block symlink breakout by default. If your symlinks point to files outside of your static root, it is highly recommended to copy them instead.