proposed fix for #731
This commit is contained in:
4
dist/swagger-ui.js
vendored
4
dist/swagger-ui.js
vendored
@@ -1575,8 +1575,8 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
if (this.model.swaggerVersion === "2.0") {
|
||||
if ("validatorUrl" in opts.swaggerOptions) {
|
||||
return this.model.validatorUrl = opts.swaggerOptions.validatorUrl;
|
||||
} else if (this.model.url.match(/https?:\/\/localhost/)) {
|
||||
return this.model.validatorUrl = this.model.url;
|
||||
} else if (this.model.url.indexOf("localhost") > 0) {
|
||||
return this.model.validatorUrl = null;
|
||||
} else {
|
||||
return this.model.validatorUrl = "http://online.swagger.io/validator";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user