nuxt-community / axios-module

Secure and easy axios integration for Nuxt 2
https://axios.nuxtjs.org
MIT License
1.19k stars 245 forks source link

Last part of url getting removed during request #601

Closed RaoulHofmann closed 1 year ago

RaoulHofmann commented 1 year ago

Version: "@nuxtjs/axios@^5.13.6"

I'm running into a weird problem were the last part of the url gets removed somewhere during the request, I can't seem to track down where. It doesn't happen on every request I haven't figured out how to trigger a reproduction, it just seems to happen randomly.

nuxt.config has baseURL setup like this axios: { baseURL: 'http://localhost:8081' }

The request is being sent like this this.$axios.get('/api/v1/element')

I've setup a helper to check the request $axios.onRequest((config) => { console.log('Making ${config.method.toUpperCase()} request to ${config.url}', config.data ? config.data : '') })

I see this in the console log Making GET request to /api/v1/element

But then I see this immediately afterwards in the console log image

I've checked the config in both $axios.onError and $axios.onResponse and the url is correct.