From a33997976f913bfa85317dcc7bcccdcb358bed4b Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Tue, 18 Oct 2016 21:27:20 +0200 Subject: [PATCH] KEYCLOAK-3017 Expose Location header in cors request to admin endpoint --- .../java/org/keycloak/services/resources/admin/AdminRoot.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/src/main/java/org/keycloak/services/resources/admin/AdminRoot.java b/services/src/main/java/org/keycloak/services/resources/admin/AdminRoot.java index 5a6f4f1edd..b7dcddf90f 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/AdminRoot.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/AdminRoot.java @@ -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);