rhtyd commented on a change in pull request #4176:
URL: https://github.com/apache/cloudstack/pull/4176#discussion_r445340011



##########
File path: server/src/main/java/com/cloud/api/ApiServlet.java
##########
@@ -213,7 +213,7 @@ void processRequestInContext(final HttpServletRequest req, 
final HttpServletResp
                     try {
                         responseString = 
apiAuthenticator.authenticate(command, params, session, remoteAddress, 
responseType, auditTrailSb, req, resp);
                         if (session != null && 
session.getAttribute(ApiConstants.SESSIONKEY) != null) {
-                            resp.addHeader("SET-COOKIE", 
String.format("%s=%s;HttpOnly", ApiConstants.SESSIONKEY, 
session.getAttribute(ApiConstants.SESSIONKEY)));
+                            resp.addHeader("SET-COOKIE", 
String.format("%s=%s;HttpOnly;Path=/client", ApiConstants.SESSIONKEY, 
session.getAttribute(ApiConstants.SESSIONKEY)));

Review comment:
       @davidjumani please explore if this would work, without adding the 
/client path to the cookie; as I worry if this change can potentially break 
non-standard env (those which don't use the default context path of /client as 
defined in /etc/cloudstack/management/server.properties)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to