Allow additional cookies during xd requests
Some HTTP servers sitting in front of Gerrit may have additional authentication demands beyond what Gerrit requires for the xd request format. Allow xd requests with additional cookies to support these servers to authenticate requests and forward to Gerrit. Change-Id: I11562ab19c052dda5647cccb29265368e45a1159
This commit is contained in:
@@ -554,6 +554,7 @@ public class RestApiServlet extends HttpServlet {
|
||||
}
|
||||
res.addHeader(VARY, ORIGIN);
|
||||
res.setHeader(ACCESS_CONTROL_ALLOW_ORIGIN, origin);
|
||||
res.setHeader(ACCESS_CONTROL_ALLOW_CREDENTIALS, "true");
|
||||
} else if (!Strings.isNullOrEmpty(origin)) {
|
||||
// All other requests must be processed, but conditionally set CORS headers.
|
||||
if (globals.allowOrigin != null) {
|
||||
|
||||
Reference in New Issue
Block a user