[keycloak-user] CORS

Bruno Oliveira bruno at abstractj.org
Fri May 13 08:58:28 EDT 2016


Hi Kevin, have you tried this: https://github.com/keycloak/keycloak/tree/master/examples/cors ?

IMO, you don't have to change your standalone.xml get CORS working.

On 2016-05-12, Kevin Hirschmann wrote:
> Hello,
>
>
>
> I have a front-end and one back-end application. For the front-end I entered
> the web origin: http://localhost:4000.
>
> Additionally I added a line <enable-cors>true</enable-cors> to the
> standalone.xml (wildfly 10 / keycloak 1.9.4.Final)
>
>
>
>
>
> The browser console displays:
>
> The 'Access-Control-Allow-Origin' header contains multiple values
> 'http://localhost:4000, http://localhost:4000', but only one is allowed.
> Origin 'http://localhost:4000' is therefore not allowed access.
>
>
>
> If I remove the line from the client I get:
>
> localhost/:1 XMLHttpRequest cannot load
> http://localhost:8080/auth/realms/... /protocol/openid-connect/token. No
> 'Access-Control-Allow-Origin' header is present on the requested resource.
> Origin 'http://localhost:4000' is therefore not allowed access.
>
>
>
> Has anyone a hint what could cause this?
>
>
>
> Thx a lot
>
> Kevin
>

> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user


--

abstractj
PGP: 0x84DC9914


More information about the keycloak-user mailing list