You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Since #97, axios-logger can log full request URL, which is nice for user.
However, it does not behave correct in some condition
To Reproduce
Steps to reproduce the behavior:
Set up a baseUrl option in axios
Apply axios-logger
Send a request which has full URL which will override default axiosbaseUrl options
We will get a wrong log.
For example, if we set baseUrl to https://example.com, and use axios instance to request https://another-example.com, axios will actually request https://another-example.com, but axios-logger will log https://example.com/https://another-example.com
Expected behavior axios-logger should log https://another-example.com
Describe the bug
Since #97,
axios-logger
can log full request URL, which is nice for user.However, it does not behave correct in some condition
To Reproduce
Steps to reproduce the behavior:
baseUrl
option inaxios
axios-logger
axios
baseUrl
optionsFor example, if we set
baseUrl
tohttps://example.com
, and useaxios
instance to requesthttps://another-example.com
,axios
will actually requesthttps://another-example.com
, butaxios-logger
will loghttps://example.com/https://another-example.com
Expected behavior
axios-logger
should loghttps://another-example.com
Additional context
Possible related code:
axios-logger/src/common/string-builder.ts
Lines 85 to 89 in 92125b5
We can use
URL
object to correct its behaviorThe text was updated successfully, but these errors were encountered: