Spaces:
Sleeping
Sleeping
File size: 287 Bytes
9381f12 ae55ad0 9381f12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | import axios from 'axios'
const client = axios.create({
baseURL: '/rapi',
})
client.interceptors.request.use((config) => {
const token = localStorage.getItem('token')
if (token) {
config.headers.Authorization = `Bearer ${token}`
}
return config
})
export default client
|