问题
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