Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
In some cases, you may need to add CORS support to enable web-based tool to function properly. This is true for swagger-ui, for example.
Remember that in some cases, your organization already provides a proxy that enables CORS support which requires no further action from you as a developer.
Using Java/Scala + servlets, you can add filter such as io.swagger.sample.util.ApiOriginFilter.
This requires the filter being initialized in the
web.xml. Please see the sample web.xml for this. Specifically, you need the bits that define the servlet filter using
ApiOriginFilter and the
<filter-mapping> for that filter.