Built-in support for something similar to nginx proxy_redirect default
- Dominant language
- C#
- Stars
- 9.6k
- Forks
- 933
- Avg merge
- 12d 18h
- Merged PRs (30d)
- 2
Description
Tried to read everything in both https://github.com/microsoft/reverse-proxy/issues/21 and https://github.com/microsoft/reverse-proxy/issues/13, plus related PRs, and did tests myself.
But I can't find anything like a built-in feature similar to that of nginx' `proxy_redirect default` (which is enabled there by default).
So, before I start implementing my own (using response transforms), just want to make sure I didn't miss anything? And, of course, also, if it's not there, I'd suggest it as a great improvement. 😃
Gist of what I'm looking for:
```c#
.AddTransforms(transformBuilderContext =>
{
transformBuilderContext.AddResponseTransform(async transformContext =>
{
await transformContext.RedirectProxyLocationOfNewResource();
});
})
```
where `RedirectProxyLocationOfNewResource` would implement something like
```
// => POST http://service.myproxy.com {...}
// => POST https://some-backend-service.com {...}
// <= HTTP 201: Location: https://some-backend-service.com/path/to/resource
// <= HTTP 201: Location: http://service.myproxy/path/to/resource
```
Contributor guide
Assessment
This issue has not been assessed yet.