Hi guys,
Sorry if it's not the correct place to make this question (please guide me
to the correct place).
I'm facing some problems with CORS when using rh-sso 7.1.
I'm using the following environment:
- JBoss EAP 7.1 with Resteasy in the backend ->
localhost:8080/accountmovement/api
- ReactJS in the frontend -> localhost:3000
- RH-SSO -> localhost:8180
The JBoss EAP is using the Wildfly/EAP Adapter from Red Hat, with the
configurations made on the standalone.xml file as a subsystem:
<subsystem xmlns="urn:jboss:domain:keycloak:1.1">
<secure-deployment name="accountmovement.war">
<realm>demo</realm>
<resource>accountmovement-backend</resource>
<use-resource-role-mappings>true</use-resource-role-mappings>
<public-client>true</public-client>
<auth-server-url>http://localhost:8180/auth
</auth-server-url>
<ssl-required>EXTERNAL</ssl-required>
<enable-cors>true</enable-cors>
</secure-deployment>
</subsystem>
I Already enabled the Web Origins to " * " in the RH-SSO Admin console for
both of the clients I'm using.
The error I receive is the following:
""
Failed to load
http://localhost:8080/accountmovement/api/accounts?_=1543522008489:
Redirect from '
http://localhost:8080/accountmovement/api/accounts?_=1543522008489' to '
http://localhost:8180/auth/realms/demo/protocol/openid-connect/auth?respo...
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is
present on the requested resource. Origin 'http://localhost:3000' is
therefore not allowed access.
""
Do you have any idea for what can I do?
If you need more information just let me know!
Thank you,
JOÃO PAULO RAMOS
BUSINESS FINANCE - DATA SCIENCE INTERN
Red Hat Brasil
jramos(a)redhat.com M: +55-11-96505-6159
<
https://red.ht/sig>