feat(frontend): Refactor to cookie-based auth and add /api/v1 prefix
This commit is contained in:
10
frontend/src/services/api.ts
Normal file
10
frontend/src/services/api.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import axios from "axios"
|
||||
|
||||
const API_URL = import.meta.env.VITE_API_URL || ""
|
||||
|
||||
const api = axios.create({
|
||||
baseURL: `${API_URL}/api/v1`,
|
||||
withCredentials: true, // Crucial for HttpOnly cookies
|
||||
})
|
||||
|
||||
export default api
|
||||
Reference in New Issue
Block a user