CSRF Protection in Phoenix

58 views
Skip to first unread message

himanshu...@gmail.com

unread,
May 29, 2017, 8:53:38 AM5/29/17
to phoenix-talk
Hi, I have an angular app and i want to integrate it with backend in Phoenix. CSRF protection works well when i render pages through Phoenix. How do i use CSRF protection when my angular app generates pages?

benwil...@gmail.com

unread,
May 29, 2017, 9:42:56 AM5/29/17
to phoenix-talk
Isn't this already handled via CORS handling?

Aleksey Gureev

unread,
May 30, 2017, 5:50:57 AM5/30/17
to phoenix-talk
Hi mate, I believe you just save CSRF token into a window var, or into a meta tag and then use it as a parameter when sending requests to the server.
Reply all
Reply to author
Forward
0 new messages