Skip to content

Commit

Permalink
Fix cannot start management site
Browse files Browse the repository at this point in the history
  • Loading branch information
quantranepiserver committed Oct 7, 2024
1 parent 2a8aa3c commit 650f32e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
5 changes: 3 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,8 @@
<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.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 650f32e

Please sign in to comment.