handler_util.py 文件源码

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

项目:icfpc2016-judge 作者: icfpc2016 项目源码 文件源码
def _protect_before_contest_hook():
    """Before-request hook to protect the whole website before the contest."""
    if bottle.request.path.startswith(('/health', '/ping', '/api/', '/admin/')):
        return
    if not is_admin() and not settings.has_contest_started():
        bottle.abort(403, 'The contest has not started yet.')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号