CSRF token to be resolved with a Angular Front end and Django Bacend
$10-30 CAD
Завершено
Опублікований about 8 years ago
$10-30 CAD
Оплачується при отриманні
I am looking to resolve an issue which occurs due to the fact that my front end and back end are being hosted in different domains, To send Post requests between my front end and back end it requires a csrf token to be sent along with the message.
For my client to get the csrf token it does Get request from my backend which sends a successful response along with the csrf token. You can see it in the response header. However this csrf token is not being stored in the cookies so my application cannot access it for any Post requests later on. The problem is either on my backend or front to specify that the csrf token must be saved in the cookies.
Attached is a scrrenshot showing the csrf token in the response header and the empty cookies,
I will share the code respository to resolve the issue.