Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
import { boot } from 'quasar/wrappers'
|
||||
import axios from 'axios'
|
||||
|
||||
export const api = axios.create({
|
||||
baseURL: 'http://localhost:8080/api',
|
||||
timeout: 180000,
|
||||
withCredentials: true // refresh cookie kullanıyorsan kalsın
|
||||
})
|
||||
|
||||
export default boot(() => {
|
||||
api.interceptors.request.use((config) => {
|
||||
const token = localStorage.getItem('token') // ✅ senin authStore key’in
|
||||
|
||||
if (token) {
|
||||
config.headers = config.headers || {}
|
||||
config.headers.Authorization = `Bearer ${token}`
|
||||
}
|
||||
|
||||
return config
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user