dotnet / dotnet/yarp

Cookie Domain Rewrites

Open
#2,986 3 comments 0 reactions 0 assignees View on GitHub
Type: Idea
Dominant language
C#
Stars
9.6k
Forks
933
Avg merge
12d 18h
Merged PRs (30d)
2

Description

### What should we add or change to make your life better?

When proxying services that respond with [`Set-Cookie`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Set-Cookie) headers, the [`Domain` attribute](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Set-Cookie#domaindomain-value) prevents the browser from saving the cookies. This can be remedied by a [custom transform](https://github.com/dotnet/yarp/issues/1109#issuecomment-866981809) but obviously requires a bit of work.

### Why is this important to you?

Other frameworks, notably the [node-http-proxy](https://github.com/http-party/node-http-proxy#:~:text=cookieDomainRewrite%3A%20rewrites%20domain%20of%20set%2Dcookie%20headers.) package, support this via a configuration option. A similar option here, either by route or cluster, would eliminate the boilerplate.

Examples from other proxy technologies:
- [Apache `mod_proxy`](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypassreversecookiedomain)
- [nginx `ngx_http_proxy_module`](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cookie_domain)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.