cherrypy/jquery CORS trouble

烈酒焚心 提交于 2019-12-01 20:45:41

Are you activating the CORS tool?. You can use the tool by decorating the calling methods or set it on the configuration.

Given that the implementation of PyCachedAdmin is no expressed on the question I might guess that probably you are not enabling the tool, to do so you just need to change the config dictionary and make something like this:

    cherrypy.quickstart(PyCachedAdmin(),
                        config={
                            '/': {
                               'request.dispatch':
                                    cherrypy.dispatch.MethodDispatcher(),
                               'tools.CORS.on': True}})

Or if the methods that you are using on PyCacheAdmin has already been decorated or using _cp_config that extra configuration is not required and this answers will not help you.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!