question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Axios 0.19.0 issue

See original GitHub issue

Describe the bug I have problem with axios 0.19.0 , my code works well with axios 0.18.0 , I think axios 19 has issue with baseUrl config

To Reproduce

https://runkit.com/sm2017/5d748f34dda96b001a60f5d0

var axios = require("axios")

const instance = axios.create({
  baseUrl:'https://github.com/axios',
});

await instance.get('/axios');
Error: connect ECONNREFUSED 127.0.0.1:80
A stack trace for this error could not be retrieved because stack was already called.

Expected behavior It must load axios github page

Environment:

  • Axios Version [e.g. 0.18.0] 0.0.19
  • OS: [e.g. iOS 12.1.0, OSX 10.13.4] , windows 10
  • Browser [e.g. Chrome, Safari] nodejs
  • Browser Version [e.g. 22] v10.15.3
  • Additional Library Versions [e.g. React 16.7, React Native 0.58.0] I test in react native 0.60.5 too

Additional context/Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:11

github_iconTop GitHub Comments

3reactions
sm2017commented, Sep 27, 2019

So it is a brwaking change

2reactions
sm2017commented, Sep 14, 2019

@dingziqi , @cesar18pena what do you think about the following codes

var axios = require("axios@0.18.0")

const instance = axios.create({
  baseURL:'https://postman-echo.com/',
  url:'/get',
  params:{
    "foo1": "bar1",
    "foo2": "bar2"
  }
});

const {data} = await instance.request();

console.log(data)
var axios = require("axios")

const instance = axios.create({
  baseURL:'https://postman-echo.com/',
  url:'/get',
  params:{
    "foo1": "bar1",
    "foo2": "bar2"
  }
});

const {data} = await instance.request();

console.log(data)

https://runkit.com/embed/nzbzdjc4auv7 works well but https://runkit.com/embed/lro4kcp7w8ir not

Read more comments on GitHub >

github_iconTop Results From Across the Web

axios@0.19.0 - Snyk Vulnerability Database
Affected versions of this package are vulnerable to Server-Side Request Forgery (SSRF). An attacker is able to bypass a proxy by providing a...
Read more >
axios : 0.19.0 - org.webjars.npm - Maven Central
axios - WebJar for axios. ... org.webjars.npm:axios 0.19.0. content_copy. <?xml version="1.0" encoding="UTF-8"?> ...
Read more >
axios - npm
Promise based HTTP client for the browser and node.js. Latest version: 1.2.1, last published: 23 days ago. Start using axios in your project ......
Read more >
Why did npm update axios fail to update but npm uninstall ...
When I run npm update -S axios --loglevel verbose with npm 6 I got the result. npm verb outdated not updating axios because...
Read more >
CVE-2020-28168 Detail - NVD
Axios NPM package 0.21.0 contains a Server-Side Request Forgery (SSRF) vulnerability where an attacker is able to bypass a proxy by ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found