Resolve CORS errors
Cross-Origin Resource Sharing (CORS) errors occur when a web application tries to make a cross-origin HTTP request to a server that does not allow it. These errors commonly occur when using connections to external resources in your applications.
In Uiflow, CORS errors appear in the Connect tab when you try to send a REST API request, and require you to select one of the following solutions:
Note: CORS errors are vital security measures, so the easiest resolution may not be in the best interest of your application. The best solution depends on you and your organization's needs.
A proxy server can act as an intermediary between the client and the server and help bypass CORS restrictions. You can then make requests to the proxy API, which should forward your requests to the actual server and return responses to your application.
To use a proxy server in Uiflow, enter its information into your connection.
If you have access to the connection provider's server, you can configure it to enable CORS by including the necessary headers in the HTTP response. The
Access-Control-Allow-Origin
header is the most important of these headers, and indicates which origins are allowed to access the resource. You can add this header to the server's HTTP response to allow requests from specific origins.