I am seem to have a singifigant challenge getting CORS enabled in Tomcat for Keyloak. I have taken the following step:
enabled CORS in keycloak.json as follows: "enable-cors" : true,
"cors-max-age" : 1000,
"cors-allowed-methods": "POST, PUT, DELETE, GET"
enabled CORS in web.xml as follows:
<filter>
<filter-name>CORS</filter-name>
<filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CORS</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>