Skip to content

Commit 506adc5

Browse files
authored
Merge pull request #866 from hsingh23/patch-1
Fixes incorrect protocol bug
2 parents 20bac9e + 2cff409 commit 506adc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ SwaggerClient.prototype.buildFromSpec = function (response) {
317317
if (typeof this.scheme === 'undefined' && typeof this.schemes === 'undefined' || this.schemes.length === 0) {
318318
if(typeof window !== 'undefined') {
319319
// use the window scheme
320-
this.scheme = window.location.scheme;
320+
this.scheme = window.location.protocol.replace(':','');
321321
}
322322
else {
323323
this.scheme = location.scheme || 'http';

0 commit comments

Comments
 (0)