title: nginx proxy_cookie_path with different domain attribute
body: <p>I want to proxy_pass a domain <code>www.example.com</code> to <code>www.otherdomain.com</code>. The proxy works as expected but I have a problem to set the correct cookies on <code>www.example.com</code> as well (I need a session cookie for this to work)</p>
  <p>In my nginx.conf I have <code>proxy_cookie_path / &quot;/; HTTPOnly; Secure&quot;;</code>. This proxies one of the cookie headers which has no domain attribute</p>
  <p><code>set-cookie: cookietest=1; Max-Age=315569520; Expires=Mon, 18-Nov-2030 08:58:02 GMT</code></p>
  <p>But not for the cookie with the domain attribute
  <code>set-cookie: SESSIONID=sessionID; Domain=www.otherdomain.com; Path=/; HTTPOnly; Secureotherdomain; Secure; HttpOnly</code>
  I guess the problem is the Domain attribute which is set to the example domain and thus rejected by my browser. Is there a way to either change this header to exclude the Domain attribute or another possibility to set this cookie to <code>www.example.com</code>?</p>