You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2019/01/16 02:11:56 UTC
[brooklyn-server] 16/49: alterations to headers
This is an automated email from the ASF dual-hosted git repository.
heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git
commit a9ef32be9f60abc41b10ee2d0a72a2c9dc10af39
Author: frogfather <j....@icloud.com>
AuthorDate: Mon Dec 10 09:45:20 2018 +0000
alterations to headers
---
.../apache/brooklyn/rest/security/jaas/GoogleOauthLoginModule.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/security/jaas/GoogleOauthLoginModule.java b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/security/jaas/GoogleOauthLoginModule.java
index 9a187ef..2a773dc 100644
--- a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/security/jaas/GoogleOauthLoginModule.java
+++ b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/security/jaas/GoogleOauthLoginModule.java
@@ -327,6 +327,10 @@ public class GoogleOauthLoginModule implements LoginModule {
// signed in
.append("&approval_prompt=force"); // this requires them to verify which account to use, if they are
// already signed in
+
+ response.addHeader("Origin", "http://localhost.io:8081");
+ response.addHeader("Access-Control-Request-Method", "GET, POST");
+ response.addHeader("Access-Control-Request-Headers", "origin, x-requested-with");
logger.debug(oauthUrl.toString());
response.sendRedirect(oauthUrl.toString());
return false;