We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5aecb33 + 962c0fc commit 2ce72baCopy full SHA for 2ce72ba
lib/client.js
@@ -353,7 +353,10 @@ SwaggerClient.prototype.buildFromSpec = function (response) {
353
else {
354
this.scheme = location.scheme || 'http';
355
}
356
- } else if (typeof this.scheme === 'undefined') {
+ } else if (typeof window !== 'undefined' && window.location.protocol.startsWith('chrome-extension')) {
357
+ // if it is chrome swagger ui extension scheme then let swagger doc url scheme decide the protocol
358
+ this.scheme = location.scheme;
359
+ } else if (typeof this.scheme === 'undefined') {
360
if(typeof window !== 'undefined') {
361
var scheme = window.location.protocol.replace(':','');
362
if(scheme === 'https' && this.schemes.indexOf(scheme) === -1) {
0 commit comments