def is_valid_origin(self, value): if value in WHITELIST_ORIGINS: return True bits = parse_uri_match(value) # ports are not supported on matching expressions (yet) if ':' in bits.domain: return False return True
def is_valid_origin(self, value): if value in self.WHITELIST_ORIGINS: return True bits = parse_uri_match(value) # ports are not supported on matching expressions (yet) if ':' in bits.domain: return False return True