Fix for #1252, check for http protocol before setting validator url
This commit is contained in:
@@ -68,7 +68,9 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Default validator
|
// Default validator
|
||||||
this.model.validatorUrl = window.location.protocol + '//online.swagger.io/validator';
|
if(window.location.protocol.startsWith('http')) {
|
||||||
|
this.model.validatorUrl = window.location.protocol + '//online.swagger.io/validator';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user