Revert use of cookies, go back to using a JWT
This commit is contained in:
parent
871147f2d9
commit
03c83c084a
8 changed files with 80 additions and 44 deletions
|
@ -1,3 +1,5 @@
|
|||
import User from './../models/user';
|
||||
|
||||
/**
|
||||
* We'll load the axios HTTP library which allows us to easily issue requests
|
||||
* to our Laravel back-end. This library automatically handles sending the
|
||||
|
@ -7,6 +9,7 @@
|
|||
let axios = require('axios');
|
||||
axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
axios.defaults.headers.common['Accept'] = 'application/json';
|
||||
axios.defaults.headers.common['Authorization'] = `Bearer ${User.getToken()}`;
|
||||
|
||||
if (typeof phpdebugbar !== 'undefined') {
|
||||
axios.interceptors.response.use(function (response) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue