-
-
Save Desttro/7db28f589747b8cf30aef2d63af3a938 to your computer and use it in GitHub Desktop.
override axios default csrf header and cookie name to match what Django expects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var axios = require("axios"); | |
| var axiosDefaults = require("axios/lib/defaults"); | |
| axiosDefaults.xsrfCookieName = "csrftoken" | |
| axiosDefaults.xsrfHeaderName = "X-CSRFToken" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment