I have frontend deployed on github pages with router working in history mode. In this configuration it is required for router to have base parameter, bacause frontend is available under https://klima7.github.io/repo-name
Vue.router = new VueRouter({
mode: "history",
base: '/repo-name/',
routes
})
And my axios is configured in this way
axios.defaults.baseURL = "https://api.backend.com"
Now when I'm performing for example auth.login operation with vue-auth the request is sent to https://api.backend.com/repo-name/auth/login instead of https://api.backend.com/auth/login, what I want.
When I'm using axios outside vue-auth requests are sent normally to https://api.backend.com, so I don't understand why vue-auth is adding this strange /repo-name/ part.
Is there any way to get rid of this /repo-name/ part in auth requests? Maybe I don't understand something.
I have frontend deployed on github pages with router working in history mode. In this configuration it is required for router to have base parameter, bacause frontend is available under
https://klima7.github.io/repo-name
And my axios is configured in this way
axios.defaults.baseURL = "https://api.backend.com"
Now when I'm performing for example auth.login operation with vue-auth the request is sent to
https://api.backend.com/repo-name/auth/login
instead ofhttps://api.backend.com/auth/login
, what I want.When I'm using axios outside vue-auth requests are sent normally to
https://api.backend.com
, so I don't understand why vue-auth is adding this strange/repo-name/
part.Is there any way to get rid of this
/repo-name/
part in auth requests? Maybe I don't understand something.