-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Description
Abs path in getAbsoluteBasePath from swagger.js calculated not correctly in case when relativeBasePath is /. Currently it returns whole url except slash itself. When the basePath is / then we should treat url as <proto>://<domain> (root of the domain path). Check the patch to see what i mean.
--- dist/lib/swagger.js (revision c92e9a14b98a99064a6256a71706b6b586271a98)
+++ dist/lib/swagger.js (revision )
@@ -381,7 +381,9 @@
return url + "/" + relativeBasePath;
}
} else if (relativeBasePath === "/") {
- return url.substring(0, pos);
+ parts = url.split("/");
+ url = parts[0] + "//" + parts[2];
+ return url;
} else {
return url.substring(0, pos) + relativeBasePath;
}
Metadata
Metadata
Assignees
Labels
No labels