Merge pull request #3357 from stianst/KEYCLOAK-3107

KEYCLOAK-3017 Expose Location header in cors request to admin endpoint
This commit is contained in:
Stian Thorgersen 2016-10-19 08:45:18 +02:00 committed by GitHub
commit f2f508ac2e

View file

@ -211,7 +211,7 @@ public class AdminRoot {
logger.debug("authenticated admin access for: " + auth.getUser().getUsername());
}
Cors.add(request).allowedOrigins(auth.getToken()).allowedMethods("GET", "PUT", "POST", "DELETE").auth().build(response);
Cors.add(request).allowedOrigins(auth.getToken()).allowedMethods("GET", "PUT", "POST", "DELETE").exposedHeaders("Location").auth().build(response);
RealmsAdminResource adminResource = new RealmsAdminResource(auth, tokenManager);
ResteasyProviderFactory.getInstance().injectProperties(adminResource);