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 2021/11/11 04:20:57 UTC

[skywalking-nodejs] branch master updated: Regard `baseURL` when in Axios Plugin (#63)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-nodejs.git


The following commit(s) were added to refs/heads/master by this push:
     new 271e74e  Regard `baseURL` when in Axios Plugin (#63)
271e74e is described below

commit 271e74e884cf5be72e2ea7487f2f200116d268cd
Author: nd-lqj <82...@qq.com>
AuthorDate: Thu Nov 11 12:20:52 2021 +0800

    Regard `baseURL` when in Axios Plugin (#63)
---
 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 a335b69..9727f75 100644
--- a/src/plugins/AxiosPlugin.ts
+++ b/src/plugins/AxiosPlugin.ts
@@ -45,7 +45,7 @@ class AxiosPlugin implements SwPlugin {
       else
         config = url ? {...url} : {};
 
-      const {origin, host, pathname: operation} = new URL(config.url);  // TODO: this may throw invalid URL
+      const {origin, host, pathname: operation} = new URL(config.url, config.baseURL);  // TODO: this may throw invalid URL
       const method = (config.method || 'GET').toUpperCase();
       const span = ignoreHttpMethodCheck(method)
         ? DummySpan.create()