def is_internal_request(self, domain, referer):
        # Different subdomains are treated as different domains.
        return bool(re.match("^https?://%s/" % re.escape(domain), referer))
Returns True if the referring URL is the same domain as the current request.
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/middleware/common.py/BrokenLinkEmailsMiddleware.is_internal_request