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

Use ShellSettings.RequestUrlHosts that uses static separators #13021

Merged
merged 10 commits into from Jan 7, 2023

Conversation

jtkech
Copy link
Member

@jtkech jtkech commented Jan 1, 2023

No description provided.

@jtkech jtkech changed the title Use static host separators ShellSettings.RequestUrlHosts property using static separators Jan 1, 2023
jtkech added a commit to MikeAlhayek/OrchardCore that referenced this pull request Jan 2, 2023
@@ -131,7 +132,13 @@ public void WhenHostSingletonAndScoped_GetServices_Returns_CorrectImplementation
Assert.IsType<HostScopedOfTheSameTypeAsSingleton>(services.ElementAt(1));
}

private ShellBlueprint CreateBlueprint()
private static readonly ShellSettings _uninitializedDefaultShell = new()
Copy link
Member

Choose a reason for hiding this comment

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

Can we move it to fields area at the top

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay will do

@@ -588,7 +588,8 @@ private static X509Certificate2 GenerateCertificate(X509KeyUsageFlags type, RSA

X500DistinguishedName GetSubjectName()
{
try { return new X500DistinguishedName("CN=" + (settings.RequestUrlHost ?? "localhost")); }
var host = settings.RequestUrlHosts.FirstOrDefault(host => host != "localhost");
try { return new X500DistinguishedName("CN=" + (host ?? "localhost")); }
Copy link
Member

Choose a reason for hiding this comment

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

Can you format try .. cache block in your way

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay

…tors

# Conflicts:
#	src/OrchardCore.Modules/OrchardCore.Tenants/Services/TenantValidator.cs
#	test/OrchardCore.Tests/Shell/ShellContainerFactoryTests.cs
@jtkech jtkech changed the title ShellSettings.RequestUrlHosts property using static separators Use ShellSettings.RequestUrlHosts that uses static separators Jan 7, 2023
@jtkech jtkech merged commit ec02478 into main Jan 7, 2023
@jtkech jtkech deleted the jtkech/urlhost-separators branch January 7, 2023 00:10
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.

None yet

2 participants