test_all.py 文件源码

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

项目:cherrypy-cors 作者: yougov 项目源码 文件源码
def setup_server():
        class Root:

            @cherrypy.expose
            def index(self):
                return "hello"

        origins = 'http://example.com', 'https://example.com'
        config = {
            '/': {
                'cors.expose.on': True,
                'cors.expose.origins': origins,
                'cors.preflight.origins': origins,
            },
        }
        cherrypy.tree.mount(Root(), config=config)

        cherrypy_cors.install()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号