Description
We are using HTTP-Proxy-Servlet to proxy an application. Our scenario do not allow a host to host proxy, so we are proxying all first level URI-s needed.
- myapp/* -> realserver:8080/Lite (main)
- auth/* -> realserver:8080/auth
- api/* -> realserver:8080/api
The main app sends a javascript responsible for authentication. The script posts auth information to /auth and the respond sets Session cookies that should be used later with /api and main (/Lite). The realserver respond contains the below Set-Cookie headers:
Set-Cookie: ss-id=s2UG4gw2vAgTr0RPs2gA;path=/;domain=xxx;Secure;HttpOnly
Set-Cookie: ss-pid=vx1semN82iEKb8UEk5hZ;path=/;expires=Mon, 26 Apr 2038 11:27:36 GMT;domain=xxx;Secure;HttpOnly
Set-Cookie: ss-opt=perm;path=/;expires=Mon, 26 Apr 2038 11:27:36 GMT;domain=xxx;HttpOnly
But on the client side with get these cookies:
Set-Cookie: ss-id=s2UG4gw2vAgTr0RPs2gA;path=/auth;domain=xxx;Secure;HttpOnly
Set-Cookie: ss-pid=vx1semN82iEKb8UEk5hZ;path=/auth;expires=Mon, 26 Apr 2038 11:27:36 GMT;domain=xxx;Secure;HttpOnly
Set-Cookie: ss-opt=perm;path=/auth;expires=Mon, 26 Apr 2038 11:27:36 GMT;domain=xxx;HttpOnly
this results that the browser is not sending the Cookies to further requests to myapp/ and api/. I see the function copyProxyCookie cause this to happen, but has no option to keep original path or only replace according to mapping rules. Do you have any suggestion?