If you’re running keycloak on Wildfly, you can use undertow subsystem filter to write CORS
headers to all request. Something like in this post
On 8 Jan 2018, at 15.54, Kevin Price <kevprice(a)redhat.com>
wrote:
Hi everyone,
I’m on the support team with the 3scale product and I’m currently writing a JS client for
our Developer Portal to be used with RH SSO & our interactive documentation tool. So I
have a question around supporting CORS on the keycloak server.
I’m currently just running my key cloak instance as a native Java app server, is there
any way to configure CORS either on the server level or realm level? Typically users would
log into the portal to test their own application (client) credentials via the Swagger
specification, however, this means every individual application stored in the Keycloak
server needs to have the Web Origins field configured to allow requests from the developer
portal domain. I would prefer to avoid this additional configuration.
Apologies in advance if this is already covered in your documentation but I did take a
look and I couldn’t find anything relevant.
Appreciate any help on this.
Regards,
Kevin Price
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user