Do not validate if model url equals '127.0.0.1'
This commit is contained in:
@@ -57,7 +57,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
|
|||||||
if ('validatorUrl' in opts.swaggerOptions) {
|
if ('validatorUrl' in opts.swaggerOptions) {
|
||||||
// Validator URL specified explicitly
|
// Validator URL specified explicitly
|
||||||
this.model.validatorUrl = opts.swaggerOptions.validatorUrl;
|
this.model.validatorUrl = opts.swaggerOptions.validatorUrl;
|
||||||
} else if (this.model.url.indexOf('localhost') > 0) {
|
} else if (this.model.url.indexOf('localhost') > 0 || this.model.url.indexOf('127.0.0.1') > 0) {
|
||||||
// Localhost override
|
// Localhost override
|
||||||
this.model.validatorUrl = null;
|
this.model.validatorUrl = null;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user