Skip to content

Commit

Permalink
Merge pull request #160 from episerver/user/quan/fix-cannot-start-man…
Browse files Browse the repository at this point in the history
…gement-site

Fix cannot start management site
  • Loading branch information
quantranepiserver authored Oct 9, 2024
2 parents 2a8aa3c + f970ce9 commit 0fe224d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
6 changes: 4 additions & 2 deletions samples/ManagementSite/Alloy.ManagementSite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<CmsUIVersion>12.30.0</CmsUIVersion>
<CmsCoreVersion>12.21.4</CmsCoreVersion>
<HeadlessFormVersion>1.0.0</HeadlessFormVersion>
<ContentApiVersion>12.20.1</ContentApiVersion>
<FormVersion>5.9.0</FormVersion>
<ContentApiVersion>3.10.2</ContentApiVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EPiServer.CMS.AspNetCore" Version="$(CmsCoreVersion)" />
Expand All @@ -30,7 +30,9 @@
<PackageReference Include="Optimizely.Cms.Forms.ContentGraph" Version="$(HeadlessFormVersion)" />
<PackageReference Include="Optimizely.Cms.Forms.Core" Version="$(HeadlessFormVersion)" />
<PackageReference Include="Optimizely.Cms.Forms.Service" Version="$(HeadlessFormVersion)" />
<PackageReference Include="Optimizely.ContentGraph.Cms" Version="3.5.1" />
<PackageReference Include="Optimizely.ContentGraph.Cms" Version="3.9.0" />
<PackageReference Include="EPiServer.ContentDeliveryApi.Cms" Version="$(ContentApiVersion)" />
<PackageReference Include="EPiServer.ContentDeliveryApi.Core" Version="$(ContentApiVersion)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
Expand Down
14 changes: 12 additions & 2 deletions samples/ManagementSite/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using EPiServer.DependencyInjection;
using Optimizely.Cms.Forms.DependencyInjection;
using Optimizely.Cms.Forms;
using EPiServer.Cms.Shell.UI;

namespace Alloy.ManagementSite
{
Expand All @@ -46,7 +47,6 @@ public void ConfigureServices(IServiceCollection services)
if (_environment.IsDevelopment())
{
//NETCORE: Consider add appsettings support for this

services.Configure<StaticFileOptions>(o =>
{
o.OnPrepareResponse = context =>
Expand Down Expand Up @@ -88,7 +88,9 @@ public void ConfigureServices(IServiceCollection services)
.Configure<ExternalApplicationOptions>(options => options.OptimizeForDelivery = true)
.ConfigureDisplayOptions()
.AddContentDelivery(managementSiteOptions)
.ConfigureDxp(managementSiteOptions, _configuration);
.ConfigureDxp(managementSiteOptions, _configuration)
.AddAdminUserRegistration(options => options.Behavior = RegisterAdminUserBehaviors.Enabled |
RegisterAdminUserBehaviors.LocalRequestsOnly);

services.AddCors(opts =>
{
Expand Down Expand Up @@ -194,6 +196,14 @@ public void PostConfigure(string name, OptimizelyFormsServiceOptions options)
client.EncryptionKeys.Add(key);
}
}

foreach (var client in options.OpenIDConnectClients)
{
foreach (var key in _options.SigningCredentials.Select(c => c.Key))
{
client.SigningKeys.Add(key);
}
}
}
}
}

0 comments on commit 0fe224d

Please sign in to comment.