axiosConfig.js 290 Bytes
Newer Older
wangcong committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
import axios from 'axios'
import nros from 'nr.os.js'

const service = axios.create({
  baseURL: window.osConfig.baseUrl,
  timeout: 120000
})

service.interceptors.request.use(config => {
  config.headers.Authorization = nros.SDK.utils.getToken()
  return config
})

export default service