CORS error when making request from Swagger UI to Keycloak
I'm trying to secure my ASP.NET Core 8 Web API with Keycloak.
I've created a realm and an user with confidential access-type, so it needs a secret. Everything is well implemented I think, but when I try to make a request from Swagger UI, it gives me the following CORS error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:7777/realms/dc2-local/protocol/openid-connect/auth?xxx (Reason: CORS header ‘Access-Control-Allow-Origin’...