CORS issue with swagger

試著忘記壹切 提交于 2019-12-20 07:49:05

问题


We are trying to host api spec yml file in our svn repository which is hosted on another server. When we are pointing to yml file from this server we are getting cors error in swagger-ui.


回答1:


You need to enable CORS on the server that hosts your YAML file. How you do this depends on the server you use. This site has instructions for many server types: https://enable-cors.org/server.html



来源:https://stackoverflow.com/questions/50983373/cors-issue-with-swagger

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