Three Ways to Solve CORS Issue in the Embed Swagger Page in Backstage
As we mentioned in this article before, centralizing all the needed knowledge in one developer portal is a big improvement in daily working experience and convenience.
But we face a CORS problem when sending requests by an embedded swagger page in the API definition. this problem will significantly reduce the functionality of the Swagger page, so this article proposes three ways to solve it:
- allow the App to cross-origin for your Backstage domain
- provide modified plain-text open API JSON and add proxy
- change the server URL when rendering pages and add proxy