[Vuejs]-Using PHP scripts in Vue

0👍

try setting up the base url of axios.

import axios from 'axios'
window.axios.defaults.headers.common = {'X-Requested-With': 'XMLHttpRequest'}
window.axios.defaults.baseURL = (process.env.NODE_ENV !== 'production') ? 'http://my-domain.com/' : ''

Leave a comment