jacekkow/keycloak-protocol-cas

CORS error on localhost

Opened this issue · 0 comments

Hello, I am getting CORS errors when using Keycloak+CAS and a simple React app running on localhost.

Access to fetch at '<HOST>/realms/<REALM>/protocol/cas/p3/serviceValidate?service=http%3A%2F%2Flocalhost%3A5173%2F%3Fstatus%3Din_process&ticket=ST-2b6156ee-3007-437a-88b9-4443ed44cee5.0ea8c000-d6ae-40b4-8014-75f2c33cb7a2.dfde6587-7dab-448b-a8ad-f34232d2224f&format=json'
from origin 'http://localhost:5173' has been blocked by CORS policy: 
Response to preflight request doesn't pass access control check:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

My access settings are set up such as :

image

The same configuration and same set-up with OIDC works without any issues.

Any idea or help would be appreciated 🙏

Thanks!