SESSION_COOKIE_SECURE=True in Django 2.2 redirects Admin login to itself
--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Ocean Floor
--
Chapters
00:00 Session_cookie_secure=True In Django 2.2 Redirects Admin Login To Itself
01:32 Accepted Answer Score 4
01:50 Answer 2 Score 0
02:08 Thank you
--
Full question
https://stackoverflow.com/questions/5642...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #django #sessioncookies
#avk47
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Ocean Floor
--
Chapters
00:00 Session_cookie_secure=True In Django 2.2 Redirects Admin Login To Itself
01:32 Accepted Answer Score 4
01:50 Answer 2 Score 0
02:08 Thank you
--
Full question
https://stackoverflow.com/questions/5642...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #django #sessioncookies
#avk47
ACCEPTED ANSWER
Score 4
Actually, the following works.
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
It is just that testing in on my development environment, HTTPS is not available.
ANSWER 2
Score 0
It seems the SESSION_COOKIE_SECURE option works correctly only under the HTTPS connection.
But, I have no idea why does it work under HTTP in my local environment with default Django's manage.py runserver but not Nginx / gunicorn in production...