Posts

Showing posts from February, 2025

Troubleshooting CORS Configuration in WSO2 APIM v3.2

Image
Cross-Origin Resource Sharing (CORS) is a critical mechanism that allows web applications to securely interact with resources from different origins. In WSO2 API Manager (APIM), configuring CORS correctly is essential for ensuring seamless API consumption. However, sometimes things donā€™t go as planned, even when the configurations seem correct. In this blog, Iā€™ll share my experience of troubleshooting a CORS issue in WSO2 APIM v3.2 and how I resolved it. Environment Openshift Based deployment WSO2 API Manager v3.2 Problem Statement Despite applying the correct CORS configurations via the WSO2 APIM Publisher portal on a per-API basis, the API calls were failing with the following CORS error: Access to XMLHttpRequest at 'http://192.190.29.1/api/getdetails' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. This error i...