-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Escape URLs when files are served by nginx
When serving files using the `X-Accel-Redirect` header in nginx, the header values must be URL-encoded. Otherwise, nginx will not be able to serve the files if they contain special characters. This commit adds a new `FileRedirectResponse` class to the `utils.nginx` module, to simplify the creation of responses that serve files using the `X-Accel-Redirect` header. Fixes #1212, #1223.
- Loading branch information
1 parent
cf3932f
commit 60ff832
Showing
3 changed files
with
42 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters