def _add_referrer(cls, request: Request, url_record: URLRecord):
        '''Add referrer URL to request.'''
        # Prohibit leak of referrer from HTTPS to HTTP
        # rfc7231 section 5.5.2.
        if url_record.parent_url.startswith('https://') and \
                url_record.url_info.scheme == 'http':
            return

        request.fields['Referer'] = url_record.parent_url
Add referrer URL to request.