Created
December 7, 2016 14:02
-
-
Save LasseRafn/d2c1cfd091137444507f7d932a960efc to your computer and use it in GitHub Desktop.
This file contains 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
Vue.http.headers.common['X-CSRF-TOKEN'] = Laravel.csrfToken; | |
Vue.http.interceptors.push((request, next) => { | |
request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken); | |
next(); | |
}); | |
// I tried both of these approaches (even at the same time??) | |
// It even sends the token with the request, yet it still fails | |
// (SOMETIMES).. Just at random. Can be working today, and tomorrow | |
// it will fail. My boss probably hates me. | |
// CSRF = Disabled. Never coming back again. Already lost too many | |
// clients/customers. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment