slim
slim copied to clipboard
如何解决跨域问题,该如何编写配置文件
Application的cors选项: CORS_OPTIONS = CORSOptions('', allow_credentials=True, expose_headers='', allow_headers='*')
应用于icarus项目中的时候: CORS_OPTIONS = CORSOptions('', allow_credentials=True, expose_headers='', allow_headers='*')
并不管用...
附截图:
应用于icarus项目中的时候: CORS_OPTIONS = CORSOptions('', allow_credentials=True, expose_headers='', allow_headers='*')
并不管用... 附截图:
这种问题的出现是因为config.py或者private.py文件的host需要改为如下:
HOST = '0.0.0.0'
(TMD,好羞耻,看了半天才发现,一直怀疑slim这个新框架...逃...
呃 回头我写一下config.py的内容将被private.py所覆盖这件事