From 2cff409c45be72c2cbb6264c28f8f98edd71f6ab Mon Sep 17 00:00:00 2001 From: Harsh Singh Date: Mon, 26 Sep 2016 14:13:44 -0400 Subject: [PATCH] Update client.js --- lib/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client.js b/lib/client.js index 48c518f63..8c1b9d1e7 100644 --- a/lib/client.js +++ b/lib/client.js @@ -317,7 +317,7 @@ SwaggerClient.prototype.buildFromSpec = function (response) { if (typeof this.scheme === 'undefined' && typeof this.schemes === 'undefined' || this.schemes.length === 0) { if(typeof window !== 'undefined') { // use the window scheme - this.scheme = window.location.scheme; + this.scheme = window.location.protocol.replace(':',''); } else { this.scheme = location.scheme || 'http';