Merge pull request #2829 from bodnia/fix-2827

#2827 remove online validator badge for specs hosted locally
This commit is contained in:
Anna
2017-03-30 18:55:40 +03:00
committed by GitHub
3 changed files with 11 additions and 10 deletions

16
dist/swagger-ui.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;AAsoGA;AAy4HA;AA+7FA;AA2mCA;AAm+BA;AAyiCA;AAo5BA","sourceRoot":""} {"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;AAsoGA;AAy4HA;AA+7FA;AA2mCA;AAg+BA;AAyiCA;AAu5BA","sourceRoot":""}

View File

@@ -33,7 +33,8 @@ export default class OnlineValidatorBadge extends React.Component {
if ( typeof spec === "object" && Object.keys(spec).length) return null if ( typeof spec === "object" && Object.keys(spec).length) return null
if (!this.state.url || !this.state.validatorUrl) { if (!this.state.url || !this.state.validatorUrl || this.state.url.indexOf("localhost") >= 0
|| this.state.url.indexOf("127.0.0.1") >= 0) {
return null return null
} }