Skip to content

Commit 0fe224d

Browse files
Merge pull request #160 from episerver/user/quan/fix-cannot-start-mangement-site
Fix cannot start management site
2 parents 2a8aa3c + f970ce9 commit 0fe224d

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

samples/ManagementSite/Alloy.ManagementSite.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<CmsUIVersion>12.30.0</CmsUIVersion>
66
<CmsCoreVersion>12.21.4</CmsCoreVersion>
77
<HeadlessFormVersion>1.0.0</HeadlessFormVersion>
8-
<ContentApiVersion>12.20.1</ContentApiVersion>
98
<FormVersion>5.9.0</FormVersion>
9+
<ContentApiVersion>3.10.2</ContentApiVersion>
1010
</PropertyGroup>
1111
<ItemGroup>
1212
<PackageReference Include="EPiServer.CMS.AspNetCore" Version="$(CmsCoreVersion)" />
@@ -30,7 +30,9 @@
3030
<PackageReference Include="Optimizely.Cms.Forms.ContentGraph" Version="$(HeadlessFormVersion)" />
3131
<PackageReference Include="Optimizely.Cms.Forms.Core" Version="$(HeadlessFormVersion)" />
3232
<PackageReference Include="Optimizely.Cms.Forms.Service" Version="$(HeadlessFormVersion)" />
33-
<PackageReference Include="Optimizely.ContentGraph.Cms" Version="3.5.1" />
33+
<PackageReference Include="Optimizely.ContentGraph.Cms" Version="3.9.0" />
34+
<PackageReference Include="EPiServer.ContentDeliveryApi.Cms" Version="$(ContentApiVersion)" />
35+
<PackageReference Include="EPiServer.ContentDeliveryApi.Core" Version="$(ContentApiVersion)" />
3436
</ItemGroup>
3537
<ItemGroup>
3638
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />

samples/ManagementSite/Startup.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
using EPiServer.DependencyInjection;
2424
using Optimizely.Cms.Forms.DependencyInjection;
2525
using Optimizely.Cms.Forms;
26+
using EPiServer.Cms.Shell.UI;
2627

2728
namespace Alloy.ManagementSite
2829
{
@@ -46,7 +47,6 @@ public void ConfigureServices(IServiceCollection services)
4647
if (_environment.IsDevelopment())
4748
{
4849
//NETCORE: Consider add appsettings support for this
49-
5050
services.Configure<StaticFileOptions>(o =>
5151
{
5252
o.OnPrepareResponse = context =>
@@ -88,7 +88,9 @@ public void ConfigureServices(IServiceCollection services)
8888
.Configure<ExternalApplicationOptions>(options => options.OptimizeForDelivery = true)
8989
.ConfigureDisplayOptions()
9090
.AddContentDelivery(managementSiteOptions)
91-
.ConfigureDxp(managementSiteOptions, _configuration);
91+
.ConfigureDxp(managementSiteOptions, _configuration)
92+
.AddAdminUserRegistration(options => options.Behavior = RegisterAdminUserBehaviors.Enabled |
93+
RegisterAdminUserBehaviors.LocalRequestsOnly);
9294

9395
services.AddCors(opts =>
9496
{
@@ -194,6 +196,14 @@ public void PostConfigure(string name, OptimizelyFormsServiceOptions options)
194196
client.EncryptionKeys.Add(key);
195197
}
196198
}
199+
200+
foreach (var client in options.OpenIDConnectClients)
201+
{
202+
foreach (var key in _options.SigningCredentials.Select(c => c.Key))
203+
{
204+
client.SigningKeys.Add(key);
205+
}
206+
}
197207
}
198208
}
199209
}

0 commit comments

Comments
 (0)