diff --git a/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakDeploymentBuilder.java b/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakDeploymentBuilder.java index 297111abb4..39cf52fbe9 100755 --- a/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakDeploymentBuilder.java +++ b/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakDeploymentBuilder.java @@ -73,6 +73,13 @@ public class KeycloakDeploymentBuilder { deployment.setLogoutUrl(KeycloakUriBuilder.fromUri(logoutUrl)); deployment.setAccountUrl(accountUrl); + if (adapterConfig.isCors()) { + deployment.setCors(true); + deployment.setCorsMaxAge(adapterConfig.getCorsMaxAge()); + deployment.setCorsAllowedHeaders(adapterConfig.getCorsAllowedHeaders()); + deployment.setCorsAllowedMethods(adapterConfig.getCorsAllowedMethods()); + } + return deployment; }