Repository navigation
CORS configuration for Admin REST API - /admin/serverinfo #14598
Replies: 6 comments 3 replies
|
Hello @ammartinCIC, Di you find a workaround? |
|
Afaik, CORS settings can be configured per client, as "Web Origins": https://www.keycloak.org/docs/latest/server_admin/#con-basic-settings_server_administration_guide:~:text=for%20more%20information.-,Web%20Origins,-Enter%20a%20URL |
|
Hello @danielFesenmeyer, Thanks for your answer! Yes the cors can indeed be configured by client. |
|
@danielFesenmeyer, thank you so much for taking the time to help with this! For context, this is the final blocker preventing me from shipping the Admin UI customization support with Keycloakify. So resolving this issue is high stake, I'll add you to the contributor list if you can help me figure this out 😄.
I’m not entirely sure I understand what you mean here. What I need is the ability to run the Admin UI React SPA from localhost. I can add
I agree, we’re on the same page about this. |
|
Ok I see: I was too anxious to answer. I'll investigate, that's an exellent pointer |
|
@danielFesenmeyer Let's go 🚀 , I was able to figure out from your pointer that I can add an hard codded claim to the AccessToken to make it work! Thank you very very much |
Uh oh!
There was an error while loading. Please reload this page.
Hello,
Environment:
I'm trying to make a request to
/admin/serverinfoendpoint directly from my web page (Vue), but I get:Access to XMLHttpRequest at 'https://dev.xxx.com/auth/admin/serverinfo' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resourceI know that I can configure CORS' headers in Realms Settings -> Security Defends but this request seems it's out of any realms because the url isn't
auth/realms/xxxx/serverinfo.The configuration on the master and my custom realm for Security Defends are:

But this headers doesn't appear in the response to the endpoint:

Is there any way to configure CORS' headers for Admin REST API?
Thanks in advance,
Abel
All reactions