Ejemplo n.º 1
0
    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
Ejemplo n.º 2
0
    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