Disable the validation badge for those who do not want it (#5994)

* disabled on string values: "127.0.0.1", "localhost", "none"
This commit is contained in:
Wesley Schwengle
2020-06-10 18:31:35 -04:00
committed by GitHub
parent 21f51494a2
commit 117dcc9b16
4 changed files with 60 additions and 5 deletions

View File

@@ -800,6 +800,15 @@ export function sanitizeUrl(url) {
return braintreeSanitizeUrl(url)
}
export function requiresValidationURL(uri) {
if (!uri || uri.indexOf("localhost") >= 0 || uri.indexOf("127.0.0.1") >= 0 || uri === "none") {
return false
}
return true
}
export function getAcceptControllingResponse(responses) {
if(!Im.OrderedMap.isOrderedMap(responses)) {
// wrong type!