fix: axios header 추가
This commit is contained in:
parent
a49e42687b
commit
1a6968abd1
@ -1,12 +1,13 @@
|
||||
import { useSpinnerStore } from '@/store/spinnerStore'
|
||||
import axios from 'axios'
|
||||
|
||||
export const axiosInstance = (url: string | null | undefined) => {
|
||||
export const axiosInstance = (url: string | null | undefined, headers?: Record<string, string>) => {
|
||||
const baseURL = url || process.env.NEXT_PUBLIC_API_URL
|
||||
const instance = axios.create({
|
||||
baseURL,
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
...headers,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user