do sessions in memory and also fix glaring security hole
This commit is contained in:
parent
7b6c155a73
commit
f48b421500
31 changed files with 441 additions and 440 deletions
|
@ -35,9 +35,13 @@ public static class BlogStartup
|
|||
|
||||
rootContainer.AddHostedService(_ => new BlogApplication(host));
|
||||
|
||||
rootContainer.AddScoped(_ => new ScopeBinding<IBlogModule>(host.Services.CreateScope()));
|
||||
rootContainer.AddKeyedScoped<ScopeBinding>(
|
||||
"BlogService",
|
||||
(_, o) => new ScopeBinding(host.Services.CreateScope())
|
||||
);
|
||||
|
||||
rootContainer.AddScoped(services =>
|
||||
services.GetRequiredService<ScopeBinding<IBlogModule>>().GetService()
|
||||
services.GetRequiredKeyedService<ScopeBinding>("BlogService").GetService<IBlogModule>()
|
||||
);
|
||||
|
||||
bus.Subscribe(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue