phacic
phacic

Reputation: 1542

create httpOnly cookie in Angular and Django

Am building an app using Django as the backend and Angular as the frontend. I understand that saving authentication token in httpOnly cookies is the safest, great. The real question is how do i do that. Been hearing around that i will need something like a middle man server to do that but i have not the slightest idea. Could anyone kindly point me in the right direction? I would be eternally grateful.

I've tried setting it on django that was when i realized it cannot be set across domain. So pls help

Upvotes: 0

Views: 617

Answers (1)

Dash Winterson
Dash Winterson

Reputation: 1295

In your settings.py file set SESSION_COOKIE_HTTPONLY=True

Upvotes: 1

Related Questions