Created by: Volune
Sometime the set-cookie
header specify a domain for the cookie. When proxying the a target using changeOrigin
option, the response may contain a cookie not matching the domain of the client.
Example of such a cookie: foo=bar; domain=my.domain; expires=Tue, 12-Feb-2019 10:50:41 GMT; path=/
This pull request adds an option to rewrite the set-cookie
header of the response.
Possible option values:
-
disabled (default):
cookieDomainRewrite: false
-
rewrite all domains:
cookieDomainRewrite: "my.client.domain"
-
remove all domains:
cookieDomainRewrite: ""
-
more advanced configuration (this example removes all except one):
cookieDomainRewrite: { "*": "", "some.domain": "some.domain" }
Let me know if I can improve this option or for any question.