Merge pull request #322 from stianst/master
KEYCLOAK-411 Set cors properties in KeycloakDeployment
This commit is contained in:
commit
2916cce6fb
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue