I am using the PDP endpoint of WSO2IS, the response of preflight request contains multiple values in the Access-Control-Allow-Origin header which is creating a problem in the browser:
my web.xml configuration looks like this:
<filter>
<filter-name>CORS</filter-name>
<filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
<init-param>
<param-name>cors.allowOrigin</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>cors.supportedMethods</param-name>
<param-value>GET, HEAD, POST, DELETE, OPTIONS, PATCH, PUT</param-value>
</init-param>
<init-param>
<param-name>cors.exposedHeaders</param-name>
<param-value>Access-Control-Allow-Origin, Location</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CORS</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
The exact log in the console:
Access to XMLHttpRequest at 'https://{base-url}:9443/api/identity/entitlement/decision/pdp' from origin 'http://localhost:8000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains multiple values '*, http://localhost:8000', but only one is allowed.
I have tried suggestions provided in the link: https://github.com/wso2/identity-apps#run-in-dev-mode
What is wrong with this configuration or do I need to change some other configuration in order to get this working?