[ 
https://issues.apache.org/jira/browse/KNOX-2946?focusedWorklogId=879415&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-879415
 ]

ASF GitHub Bot logged work on KNOX-2946:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 31/Aug/23 15:10
            Start Date: 31/Aug/23 15:10
    Worklog Time Spent: 10m 
      Work Description: zeroflag commented on code in PR #786:
URL: https://github.com/apache/knox/pull/786#discussion_r1311785341


##########
gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/api/CookieScopeServletFilter.java:
##########
@@ -43,7 +45,12 @@ public void init( FilterConfig filterConfig ) throws 
ServletException {
   @Override
   protected void doFilter( HttpServletRequest request, HttpServletResponse 
response, FilterChain chain )
       throws IOException, ServletException {
-    chain.doFilter(request, new CookieScopeResponseWrapper(response, 
gatewayPath, topologyName));
+    if 
("true".equals(request.getAttribute(DEFAULT_TOPOLOGY_FORWARD_ATTRIBUTE_NAME))) {

Review Comment:
   That might be a bit better. I'll modify it.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 879415)
    Time Spent: 40m  (was: 0.5h)

> Cookie Path Scoping doesn't work when using default topology URL
> ----------------------------------------------------------------
>
>                 Key: KNOX-2946
>                 URL: https://issues.apache.org/jira/browse/KNOX-2946
>             Project: Apache Knox
>          Issue Type: Bug
>            Reporter: Attila Magyar
>            Assignee: Attila Magyar
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> When gateway.scope.cookies.feature.enabled is turned on, knox will update the 
> Path attribute of the Set-Cookie header to /ctxpath/topology_name/, e.g.: 
> Original:
> Set-Cookie: xxx Path = /
> Updated:
> Set-Cookie: xxx Path = /gateway/cdp-proxy
> However, when the gateway.default.app.topology.name is set to cdp-proxy, and 
> we access a service via the default topology (there is no cdp-proxy in the 
> URL) then the cookie will be blocked by the browser.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to