KEYCLOAK-411 Set cors properties in KeycloakDeployment

This commit is contained in:
Stian Thorgersen 2014-04-07 13:39:32 +01:00
parent bbf5fee320
commit bf95c2ba85

View file

@ -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;
}