OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.44k stars 2.4k forks source link

Whether the Yarp Gateway function module can be provided in a future release #12355

Closed vipwan closed 6 months ago

vipwan commented 2 years ago

Whether the Yarp Gateway function module can be provided in a future release, If can use Yarp and OpenIdDic together, it's perfect

Skrypt commented 2 years ago

I think you can already use it but we don't provide any integration of Yarp in OC yet.

jtkech commented 2 years ago

I started to look at it but 2 years ago ;

But we may still plan to use it for example to do some kind of OC Tenants load balancing among different OC nodes served by different servers.

Skrypt commented 2 years ago

If we compare it to NGinx then it is never bundled as part of a web application. I would need to look at it but it feels like it should be something that gets implemented as a standalone service that will be invoked directly and that will proxy the calls to other internal apps.

vipwan commented 2 years ago

At present, more and more NET developers are moving closer to microservices, and the OC Framework itself has such a gene, if the OC Framework can integrate gateway load balancing authentication and link tracing, it will definitely shine in this regard

Piedone commented 2 years ago

What is it that you're looking for, exactly? You can already use YARP with Orchard without any further development (we're doing that too).

Skrypt commented 2 years ago

We would need to expose all configurations of Yarp in a module I guess. Build a UI on top of it basically.

Piedone commented 2 years ago

Hmm, I don't really see the appeal of packaging it up as a module. Perhaps only to add simple redirect rules from the admin, but otherwise you'd have to configure it from code anyway.

Skrypt commented 2 years ago

I never used it so far so I can't say much. We already have a Proxy module in OC so I assumed that he wanted something like that.

Piedone commented 6 months ago

The Clusters feature is tracked under https://github.com/OrchardCMS/OrchardCore/issues/13636 now.

weirdyang commented 2 weeks ago

What is it that you're looking for, exactly? You can already use YARP with Orchard without any further development (we're doing that too).

do you mind providing an example? is this in a module or in the host application?

hishamco commented 2 weeks ago

FYI https://github.com/OrchardCoreContrib/OrchardCoreContrib.Modules/blob/main/src/OrchardCoreContrib.ReverseProxy.Yarp/README.md if you want an extra feature you can file an issue in the related repo

Piedone commented 2 weeks ago

What is it that you're looking for, exactly? You can already use YARP with Orchard without any further development (we're doing that too).

do you mind providing an example? is this in a module or in the host application?

YARP is set up in a simple vanilla ASP.NET Core app, hosted in a container. This sits in front of the OC app, which is a separate app, hosted separately. That is all.

I don't think you need anything else for when you do this; but on Azure, and perhaps otherwise as well, you definitely need something like our UseForwardedHeadersForCloudflareAndAzure too.

weirdyang commented 2 weeks ago

What is it that you're looking for, exactly? You can already use YARP with Orchard without any further development (we're doing that too).

do you mind providing an example? is this in a module or in the host application?

YARP is set up in a simple vanilla ASP.NET Core app, hosted in a container. This sits in front of the OC app, which is a separate app, hosted separately. That is all.

I don't think you need anything else for when you do this; but on Azure, and perhaps otherwise as well, you definitely need something like our UseForwardedHeadersForCloudflareAndAzure too.

thanks i figured it out, I need to implement my own IProxyConfigProvider to allow for dynamic configuration (e.g. allowing user to customize via a UI and then apply the changes)