Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backends-nginx: Add support for Nginx versions older than 1.5.9.
In this commit we are adding support for Nginx version older than 1.5.9. This is achieved through conditionally quoting the URL's in X-Accel-Redirect headers according to compatibility with Nginx. Since newer versions of Nginx expect URL's in X-Accel-Redirect to be quoted unlike the versions older that Nginx 1.5.9. From this commit onwards we start to expect a 'NGINX_VERSION' config setting to be setup in the django settings in order to facilitate decision making regarding quoting URL's. If such a setting is not found we just assume Nginx version to be greater then 1.5.9 and make decision accordingly and then cache the decision by making use of a decorator. Using this result we decide whether the outgoing URL should be quoted or not. Fixes: johnsensible#56, johnsensible#58. Closes johnsensible#45.
- Loading branch information