Skip to content

Commit 1b5af99

Browse files
committed
Merge pull request swagger-api#665 from jonocodes/https-scheme-fix
Https resolution based on url
2 parents 3aade85 + 1446827 commit 1b5af99

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
@@ -277,7 +277,7 @@ SwaggerClient.prototype.buildFromSpec = function (response) {
277277
if (typeof this.scheme === 'undefined' && typeof this.schemes === 'undefined' || this.schemes.length === 0) {
278278
this.scheme = location.scheme || 'http';
279279
} else if (typeof this.scheme === 'undefined') {
280-
this.scheme = this.schemes[0];
280+
this.scheme = this.schemes[0] || location.scheme;
281281
}
282282

283283
if (typeof this.host === 'undefined' || this.host === '') {

0 commit comments

Comments
 (0)