Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy can be customized with middleware to enable advanced scenarios #114

Closed
ryudice opened this issue Apr 27, 2020 · 4 comments · Fixed by #890
Closed

Proxy can be customized with middleware to enable advanced scenarios #114

ryudice opened this issue Apr 27, 2020 · 4 comments · Fixed by #890
Assignees
Labels
Priority:0 Used for divisional .NET planning Type: Documentation Improvements or additions to documentation Type: Idea This issue is a high-level idea for discussion. User Story Used for divisional .NET planning

Comments

@ryudice
Copy link

ryudice commented Apr 27, 2020

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

From looking at the source code I can see that you can add custom middlewares to the reverse proxy pipeline but I dont see any documentation outlining how to do it.

Why is this important to you?

I think many of the people looking at the project is because they need to do some customization at the pipeline level and they want to avoid having to do it in another language like Lua in the case of Kong. Having this documentation would be very useful.

@ryudice ryudice added the Type: Idea This issue is a high-level idea for discussion. label Apr 27, 2020
@Tratcher
Copy link
Member

We'll certainly need docs for the whole project. The pipeline feature was just added last week 😁. You can find an example here: https://github.com/microsoft/reverse-proxy/blob/00c4e7c77059b7c4a9912a4c89c9a05026d55628/samples/ReverseProxy.Sample/Startup.cs#L49-L60
And here's a middleware. It's a normal ASP.NET Core middleware with the addition of proxy features like BackendInfo and IAvailableBackendEndpointsFeature:
https://github.com/microsoft/reverse-proxy/blob/00c4e7c77059b7c4a9912a4c89c9a05026d55628/src/ReverseProxy.Core/Middleware/LoadBalancingMiddleware.cs#L38-L61

Did you have a specific scenario in mind?

@analogrelay analogrelay added this to the 1.0.0 milestone Apr 28, 2020
@ryudice
Copy link
Author

ryudice commented Apr 30, 2020

Thanks for the reply. Yeah the scenario I was specifically looking at is doing request transformations before passing it on to the backend. The reason we have this usecase is because we have legacy applications which are costly to modify, and in order to avoid being limited by them we use proxies to transform old request format into the new request format.

@Tratcher
Copy link
Member

Makes sense. We're designing transforms as a first class feature over at #21.

@Tratcher Tratcher added the Type: Documentation Improvements or additions to documentation label Apr 30, 2020
@gaumery
Copy link

gaumery commented May 19, 2020

thank u actually I really don't understand what you saying I'm just brainstorming cos I'm a kind of human being never stop learning

@samsp-msft samsp-msft added the User Story Used for divisional .NET planning label Oct 21, 2020
@samsp-msft samsp-msft changed the title Documentation on using middlewares Proxy can be customized with middleware to enable advanced scenarios Oct 21, 2020
@samsp-msft samsp-msft added the Priority:0 Used for divisional .NET planning label Jan 20, 2021
@Tratcher Tratcher self-assigned this Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:0 Used for divisional .NET planning Type: Documentation Improvements or additions to documentation Type: Idea This issue is a high-level idea for discussion. User Story Used for divisional .NET planning
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants