django 1.5 python set X-Content-Type-Options nosniff

1k views Asked by At

We would like to add X-Content-Type-Options nosniff .

We can't upgrade to newer django version (1.5), so we can't use the SECURE_CONTENT_TYPE_NOSNIFF because we don't have SecurityMiddleware.

Any help is appriciated.

1

There are 1 answers

0
Alasdair On BEST ANSWER

The security middleware came from django-secure, so you could install that.

However, you really should upgrade Django. Django 1.5 is years out of date and insecure.