mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-01-24 07:08:35 +01:00
15 lines
330 B
JavaScript
Vendored
15 lines
330 B
JavaScript
Vendored
import Vue from 'vue'
|
|
import router from '../routes/routes'
|
|
|
|
axios.interceptors.request.use(request => {
|
|
|
|
const token = localStorage.getItem('jwt')
|
|
|
|
if(token) {
|
|
request.headers.common['Authorization'] = 'Bearer ' + token
|
|
}
|
|
|
|
request.headers.common['Content-Type'] = 'application/json'
|
|
|
|
return request
|
|
}) |