I have a csrf token dumped into a JS variable on window. I have a form that makes AJAX requests (without Ember Data) from the controller. In my request I need to pass along the csrf token. Where are the recommended places to put this token in Ember? Right now I am grabbing it off window but I realize this is bad for testability. My first thought is to register it into the container. I'm pretty new to Ember so any feedback would be much appreciated!
Aucun commentaire:
Enregistrer un commentaire