-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Documentation about middlewares seems to be incorrect #1686
Comments
Hi lvyyljn!
Why do you use previous version? Your project is based on .NET 6 ? |
Hi @raman-m, it was predefined before me to use .NET 6, so we have to use 18.0.0, would be glad to update but still) |
What is your real name? |
Is this relevant?) |
@lvyyljn commented on 2023-08-29 at 07:39:
We have most actual docs in the repo: Middleware Injection and Overrides | Ocelot/docs/features/middlewareinjection.rst at develop · ThreeMammals/Ocelot
It says actually that develop should add all custom middlewares and after that developer should call
It says you cannot configure the pipeline after Ocelot's builder has ran. It is correct. |
@raman-m thanks for quick response, few questions
You mean here the Ocelot's pipeline correct?
Maybe I misunderstood something? |
Why would you like to discuss the internal HttpRequesterMiddleware ? It is a part of pipeline but it is private and cannot be overridden because this middleware is not user's one! You seem to be confused about the distinction between system (private) and user (public) middleware. And yes, the docs can be somehow corrected to eliminate this confusion. |
@lvyyljn commented on 2023-08-29 at 08:14:
Yes, you did.
Denys, you are welcome to open PR! |
@raman-m Totally agree with you on the private and public, and I don't intend to override any of the private middlewares |
I cannot get you!... |
Yes, you're right
And no, I won't create a PR for docs |
Add section "ASP.NET Core Middlewares and Ocelot Pipeline Builder"
Add section "ASP.NET Core Middlewares and Ocelot Pipeline Builder"
* #1676 Update authorization.rst * #1646 Update bigpicture.rst * #1628 Update websockets.rst * #1614 Update README.md * #1552 Update configuration.rst * #1547 Update caching.rst * #1542 Update requestaggregation.rst * Revert "#1639 Update ClientRateLimitMiddleware.cs" This reverts commit 996719e. * #1537 Update routing.rst * #1520 Update authentication.rst * #1459 Update building.rst Fix inline code block * #1412 Update errorcodes.rst * #1407 Update headerstransformation.rst * #1406 Update headerstransformation.rst Remove extra '!' * #1320 Update README.md * Update README.md Mark classes. Split sentences. * #1284 Update claimstransformation.rst * #1232 Update servicediscovery.rst * #1224 Update loadbalancer.rst * #1189 Update caching.rst * Update gettingstarted.rst Mark up 'net7.0' as code block. Convert script block to PowerShell one. Change the link to NuGet. * #1386 Update loadbalancer.rst * Update loadbalancer.rst: Make code snippet shorter * #1686 Update middlewareinjection.rst Add section "ASP.NET Core Middlewares and Ocelot Pipeline Builder" * Update logging.rst Review RST markup * Update methodtransformation.rst Review RST markup * Update README.md Sync to "Big Picture" page in Introduction
I'm currently working on updating the response from downstream and noticed some inconsistency
As it's stated here https://ocelot.readthedocs.io/en/latest/features/middlewareinjection.html
Obviously you can just add middleware as normal before the call to app.UseOcelot() It cannot be added after as Ocelot does not call the next middleware.
And it's not true, as the last middleware in the BuildOcelotPipeline method is HttpRequesterMiddleware that calls the next middleware, I think documentation should be changed
Specifications
The text was updated successfully, but these errors were encountered: