mirror of https://github.com/sundowndev/http.git
chore: update test
parent
d21aca4432
commit
0211114c22
|
@ -11,12 +11,12 @@ module.exports = {
|
||||||
{ handler: require('../../') }
|
{ handler: require('../../') }
|
||||||
],
|
],
|
||||||
serverMiddleware: ['~/api.js'],
|
serverMiddleware: ['~/api.js'],
|
||||||
axios: {
|
http: {
|
||||||
prefix: '/test_api',
|
prefix: '/test_api',
|
||||||
proxy: true,
|
proxy: true,
|
||||||
credentials: true,
|
credentials: true,
|
||||||
debug: true,
|
debug: true,
|
||||||
retry: true
|
retry: true
|
||||||
},
|
},
|
||||||
plugins: ['~/plugins/axios']
|
plugins: ['~/plugins/http']
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
export default function ({ $http, redirect }) {
|
export default function ({ $http, redirect }) {
|
||||||
|
$http.setHeader('xsrfHeaderName', 'X-CSRF-TOKEN')
|
||||||
|
|
||||||
$http.onRequest((config) => {
|
$http.onRequest((config) => {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log('SPY: ' + config.url)
|
console.log('SPY: ' + config.url)
|
||||||
|
|
||||||
$http.defaults.xsrfHeaderName = 'X-CSRF-TOKEN'
|
|
||||||
})
|
})
|
||||||
}
|
}
|
Loading…
Reference in New Issue