Merge pull request #322 from stianst/master

KEYCLOAK-411 Set cors properties in KeycloakDeployment
This commit is contained in:
Stian Thorgersen 2014-04-07 13:39:53 +01:00
commit 2916cce6fb

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