-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Correct the order of module configurations #16227
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
src/OrchardCore/OrchardCore.Abstractions/OrchardCoreConstants.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've swapped out the preview packages under Lombiq's Open-Source Orchard Core Extensions, this PR and has run its tests. Those passed, so this is a good sign.
src/OrchardCore.Modules/OrchardCore.DataProtection.Azure/Startup.cs
Outdated
Show resolved
Hide resolved
I don't see |
@kevinchalet not a bad idea. I added that at the same order as CORS just to show that there is no significant difference in order between CORS and Reverse Proxy. I added a note as it must configured after the reverse proxy. |
👍🏻 That said, I wonder if we shouldn't use unique values to make the order more explicit: I haven't tested, but since the ordering logic is just an |
IMO, if there is a need to place one after another, then we should use unique values to guaranty the order. But, if there we don't care if CORS came before Security or the other way around, then I don't see the value of adding a unique value. In other words, if either Security or CORS were registered first, there should not be any issue. |
Fix #14874
In the PR, we have introduced a central constants class that manages the order of module registrations. This improvement provides a comprehensive view of all registered modules, making it easier to adjust the order as needed. If someone needs to change the order of any module, they can see at a glance if other order numbers need to be adjusted accordingly.