You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2022/09/20 11:44:08 UTC
[skywalking-nodejs] branch fix/invalid-url created (now e249732)
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a change to branch fix/invalid-url
in repository https://gitbox.apache.org/repos/asf/skywalking-nodejs.git
at e249732 Fix invalid url error in axios plugin
This branch includes the following new commits:
new e249732 Fix invalid url error in axios plugin
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[skywalking-nodejs] 01/01: Fix invalid url error in axios plugin
Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch fix/invalid-url
in repository https://gitbox.apache.org/repos/asf/skywalking-nodejs.git
commit e249732653bd459bc7b52b9ac1cbd0e39f07f0eb
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Tue Sep 20 19:43:53 2022 +0800
Fix invalid url error in axios plugin
---
src/plugins/AxiosPlugin.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/AxiosPlugin.ts b/src/plugins/AxiosPlugin.ts
index 63b3e85..2889105 100644
--- a/src/plugins/AxiosPlugin.ts
+++ b/src/plugins/AxiosPlugin.ts
@@ -43,7 +43,7 @@ class AxiosPlugin implements SwPlugin {
if (typeof url === 'string') config = config ? { ...config, url } : { url };
else config = url ? { ...url } : {};
- const { origin, host, pathname: operation } = new URL(config.url, config.baseURL); // TODO: this may throw invalid URL
+ const { origin, host, pathname: operation } = new URL(config.url, config.baseURL ?? this.defaults?.baseURL);
const method = (config.method || 'GET').toUpperCase();
const span = ignoreHttpMethodCheck(method)
? DummySpan.create()