request.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:trydjango18 作者: lucifer-yqh 项目源码 文件源码
def scheme(self):
        # First, check the SECURE_PROXY_SSL_HEADER setting.
        if settings.SECURE_PROXY_SSL_HEADER:
            try:
                header, value = settings.SECURE_PROXY_SSL_HEADER
            except ValueError:
                raise ImproperlyConfigured(
                    'The SECURE_PROXY_SSL_HEADER setting must be a tuple containing two values.'
                )
            if self.META.get(header, None) == value:
                return 'https'
        # Failing that, fall back to _get_scheme(), which is a hook for
        # subclasses to implement.
        return self._get_scheme()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号