Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you disable SECURE_SSL_REDIRECT for some views in Django?

I have a site where I want to set SECURE_SSL_REDIRECT = True for most views, but there is one view that I need to disable SSL (for communication with a client program that doesn't support it).

I could create a whole new Django project for the view that doesn't require SSL, but there must be an easier way to manage that.

How can I selectively turn off the SSL redirect?

like image 322
user1389840 Avatar asked Dec 23 '15 08:12

user1389840


1 Answers

Best way to disable SSL is to define SECURE_REDIRECT_EXEMPT in settings...

like image 198
Raja Simon Avatar answered Nov 15 '22 07:11

Raja Simon