mirror of
https://github.com/kevin-DL/comedy-video-lib.git
synced 2026-01-14 20:14:49 +00:00
17 lines
337 B
JavaScript
17 lines
337 B
JavaScript
export default function ({ $axios }, inject) {
|
|
// Create a custom axios instance
|
|
const api = $axios.create({
|
|
headers: {
|
|
common: {
|
|
Accept: 'text/plain, */*',
|
|
},
|
|
},
|
|
})
|
|
|
|
// Set baseURL to something different
|
|
api.setBaseURL(process.env.baseApiUrl)
|
|
|
|
// Inject to context as $api
|
|
inject('api', api)
|
|
}
|