I imported an OpenAPI spec from IFS API Explorer into my .NET Web API project to expose the IFS APIs through Swagger UI.
When I try to call the APIs from Swagger, I get a CORS error in the browser.
Is there a way to enable CORS in the IFS environment so that these API calls can work from a browser? or another alternative approch to use swagger ui to call REST endpoints?
Best answer by dsj
Hi @dileepam
One alternative is to setup a proxy API which would expose to your app instead of directly calling the IFS projections. Having proper API setup will benefit you in the future when expanding the integration with best practices so it adds may benefits in addition to resolving CORS errors :)
One alternative is to setup a proxy API which would expose to your app instead of directly calling the IFS projections. Having proper API setup will benefit you in the future when expanding the integration with best practices so it adds may benefits in addition to resolving CORS errors :)
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.