Failed to load <service url>: Request header field x-ijt is not allowed by Access-Control-Allow-Headers in preflight response.

使用pycharm,tornado写了后台,仍然使用pycharm写了前端代码,运行后出现以下错误:

Failed to load <service url>: Request header field x-ijt is not allowed by Access-Control-Allow-Headers in preflight response.

跨域问题

解决

添加pycharm的Chrome扩展

右键该扩展,点击菜单中的“选项”:

填写后,应用。

再次访问,该错误消失。

参考:CORS Control in JetBrains Chrome Extension

猜你喜欢

转载自www.cnblogs.com/for-you/p/9070985.html