From 55656a8ebcbeced77d371910126f988e1ec6de73 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Mon, 3 Dec 2018 08:43:14 -0800 Subject: [PATCH] chore(rest): review - 2 --- packages/rest/src/rest.server.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/rest/src/rest.server.ts b/packages/rest/src/rest.server.ts index a767585270de..81f6f7f68aa7 100644 --- a/packages/rest/src/rest.server.ts +++ b/packages/rest/src/rest.server.ts @@ -387,8 +387,9 @@ export class RestServer extends Context implements Server, HttpServerLike { if (specObj.servers && this._basePath) { for (const s of specObj.servers) { - if (s.url.startsWith('/')) { - s.url = s.url === '/' ? this._basePath : this._basePath + s.url; + // Update the default server url to honor `basePath` + if (s.url === '/') { + s.url = this._basePath; } } }