简体   繁体   中英

Angular 2 CSRF Token for Rails

I'm currently trying to create a small web app with Angular 2 as my front end and Rails 4 as my backend - my backend is just an API while my front-end is just sending out requests.

I ran into CSRF token authenticity errors today when trying to submit a post request - how do I add these CSRF headers into my Angular 2 headers?

为此使用angular_rails_csrf gem

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM