<div dir="ltr"><div><div>Hi<br></div><div><br></div>Here is my case. I don't have an keycloak.json. I just have a single html page, locally that makes an ajax call to a confidential application behind keycloak to get a html page. So now i am redirected to another url and then to a keycloak login Url. On requesting this url, it gives me a CORS error. In the web origins of the confidential app i am trying to access, i have added my local url. Is this supposed to work or am i to add the url else where also?? <br><br></div>Thanks.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 10, 2015 at 2:52 PM, Tero Ahonen <span dir="ltr"><<a href="mailto:Tero.Ahonen@cybercom.com" target="_blank">Tero.Ahonen@cybercom.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
Hi,
<div><br>
</div>
<div>I’m very new to with keycloak, but I think that u always have to define client in the keycloak config. in keycloak.json client is defined in field resource</div><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
<div>.t</div></font></span><span class="">
<div><br>
<div>
<blockquote type="cite">
<div>On 10 Nov 2015, at 11:11 AM, Revanth Ayalasomayajula <<a href="mailto:revanth@arvindinternet.com" target="_blank">revanth@arvindinternet.com</a>> wrote:</div>
<br>
<div>
<div dir="ltr">
<div>
<div>Hi,<br>
<br>
</div>
Thanks for the quick reply. I wanted to know, as i am requesting the login page of keycloak for a particular realm, which client in that realm should i add this web origins to??<br>
<br>
</div>
Thanks. <br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Nov 10, 2015 at 2:37 PM, Tero Ahonen <span dir="ltr">
<<a href="mailto:Tero.Ahonen@cybercom.com" target="_blank">Tero.Ahonen@cybercom.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
At least this worked for me, using laters version.<br>
<br>
Enable cors in the client by setting enable-cors field to client app's keycloak.json (if u are using one)<br>
<br>
"enable-cors": true,<br>
<br>
<br>
Then from admin console set realm’s client settings Web Origins setting to match your origins.<br>
<br>
.t<br>
<div>
<div>> On 10 Nov 2015, at 11:01 AM, Revanth Ayalasomayajula <<a href="mailto:revanth@arvindinternet.com" target="_blank">revanth@arvindinternet.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> I am using keycloak1.5.0 to secure a few of my applications and i want to request the keycloak's Login page from an ajax call. It is currently giving me a CORS error. So i wanted to know how do i enable CORS support or add my URL to allowed set??<br>
><br>
> Thanks.<br>
</div>
</div>
> _______________________________________________<br>
> keycloak-user mailing list<br>
> <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">
https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</span></div>
</blockquote></div><br></div>