Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite recursion in baseURL #16

Closed
kulakowka opened this issue Jul 5, 2017 · 4 comments
Closed

Infinite recursion in baseURL #16

kulakowka opened this issue Jul 5, 2017 · 4 comments

Comments

@kulakowka
Copy link

I received a very strange bug:

2017-07-05 9 45 47

My configuration looks like this:

2017-07-05 10 07 51

If you specify the full base url ("http://localhost:3000/api/"), then everything works:

2017-07-05 10 06 31

@rubennorte
Copy link
Contributor

I just inspected Axios code and the cause of that bug is that Axios resolves the full URL before calling interceptors, so we receive the built URL in config.url and config.baseURL still has a value. We could fix that in our side but I think that's something Axios should handle (internally removing baseURL once it's used or resolving URL's just before the request must be made).

Would you consider creating a PR there?

@kulakowka
Copy link
Author

I'm afraid that I can not even formulate the problem correctly. ^_^

@rubennorte
Copy link
Contributor

rubennorte commented Aug 12, 2017

This has already been fixed in axios/axios#950 so it'll work fine in axios-retry when it's released.

@JulesAU
Copy link

JulesAU commented Jan 22, 2018

I'm running the latest Axios (0.17.1) and I'm still seeing this behaviour (with a relative baseURL).

Have had to specify an absolute baseURL to work around it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants