cdn.py 文件源码

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

项目:opsweb 作者: wylok 项目源码 文件源码
def curl():
    form = MyForm.MyForm_input()
    if form.submit.data:
        urls = form.text.data.strip().splitlines()
        urls = set(urls)
        for url in urls:
            Purge = purge.Purged()
            if not url or url.startswith('#'):
                continue
            else:
                url = url.strip()
            if not url.startswith('http'):
                flash('url begin with http(s)://')
                return render_template('Message_static.html',Main_Infos=g.main_infos)
            url_rep=Purge.purge_cdn(url)
            flash(url+' purge CDN '+url_rep)
        return render_template('Message_static.html',Main_Infos=g.main_infos)
    return render_template('cdn.html',form=form,Main_Infos=g.main_infos)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号