Skip to content

Conversation

@gvkries
Copy link
Member

@gvkries gvkries commented Feb 6, 2026

Removed ReverseProxyService in favor of direct ISiteService usage in settings configuration. Updated namespaces for configuration classes, cleaned up Startup registrations, and improved appsettings.json KnownNetworks example. No functional changes beside the admin menu.

@MikeAlhayek I struggled to find the reverse proxy in the admin menu multiple times and I think it doesn't make sense below "Security". Reverse proxy is primarily an infrastructure/networking concern, not exclusively a security feature. So I moved it out of security, hope you agree.

Removed ReverseProxyService in favor of direct ISiteService usage in settings configuration. Updated namespaces for configuration classes, cleaned up Startup registrations, and improved appsettings.json KnownNetworks example. No functional changes beside the admin menu.
Copy link
Member

@hishamco hishamco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with this PR, unless you change the namespaces for configuration in every module. Same this for the ReverseProxyService

// "ForwardedHeaders": "None",
// "KnownNetworks": ["192.168.1.100/4", "192.168.1.101/4"],
// "KnownProxies": ["192.168.1.200", "192.168.1.201"],
// "KnownNetworks": ["192.168.1.0/24"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's th wrong with this example :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a network perspective, this example doesn't make any sense. In addition, the change adjusts the example to match the documentation.

@hishamco
Copy link
Member

hishamco commented Feb 6, 2026

I never mind changing the menu location. TBH, I lost too many times in different modules after the menu changes :)

.Permission(Permissions.ManageReverseProxySettings)
.LocalNav()
)
.Add(S["Reverse Proxy"], S["Reverse Proxy"].PrefixPosition(), proxy => proxy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is fine for me.

@gvkries
Copy link
Member Author

gvkries commented Feb 8, 2026

I disagree with this PR, unless you change the namespaces for configuration in every module. Same this for the ReverseProxyService

Before commenting, please look at the other modules. This PR actually aligns the layout to the other modules that have the same behavior concerning appsettings.json. Additionally, the affected types are IConfigureOptions implementations, that probably should've been internal anyway.

Concerning the service: For what purpose should that stay? It's just wasting CPU and mental capacity. It has no additional behavior at all.

@hishamco
Copy link
Member

hishamco commented Feb 8, 2026

https://github.com/OrchardCMS/OrchardCore/blob/main/src/OrchardCore.Modules/OrchardCore.Email.Azure/Services/AzureEmailOptionsConfiguration.cs

This is just one sample, if you want more, I will share them :) TBH I'm with you with the naming, but we need to do it everywhere

@gvkries
Copy link
Member Author

gvkries commented Feb 9, 2026

Thanks, I don't need these examples. I can give you other examples, but I know that OC is not consistent, so that is not an argument.

This whole debate is pointless. I only improved this module while we were working on PR #18739, and I don't want to lose even these small improvements. Changes to other modules don't belong in this PR.

To make the intent of the affected types clearer, I have now made them internal.

@hishamco
Copy link
Member

hishamco commented Feb 9, 2026

This whole debate is pointless. I only improved this module while we were working on PR #18739, and I don't want to lose even these small improvements. Changes to other modules don't belong in this PR.

@gvkries I knew your intent, and as you said, OC is inconsistent in many places, so let's merge this PR and start pushing PRs that align other modules to follow the same cleanup

hishamco

This comment was marked as resolved.

@gvkries gvkries merged commit 4c923f4 into main Feb 10, 2026
6 checks passed
@gvkries gvkries deleted the gvkries/reverseproxy-refactoring branch February 10, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants