quote.py 文件源码

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

项目:kapsel 作者: conda 项目源码 文件源码
def process_request(self, req, resp):
        # req.host has the port stripped from what the browser
        # sent us, even when it isn't 80, which is probably a bug
        # in Falcon. We deal with that in __init__ by removing
        # ports from self.hosts.
        if req.host not in self.hosts:
            print("Attempted request with Host header '%s' denied" % req.host)
            raise falcon.HTTPForbidden("Bad Host header", "Cannot connect via the provided hostname")


# the gunicorn application
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号