diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Startup.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/slskd/Startup.cs b/src/slskd/Startup.cs index 7843bf5d..af0fd329 100644 --- a/src/slskd/Startup.cs +++ b/src/slskd/Startup.cs @@ -104,6 +104,10 @@ namespace slskd return true; }); + // add IStateMonitor to DI, to track application state in an observable way. similar to IOptionsMonitor, + // but state is managed by the application itself. Usage is roughly the same. + services.AddSingleton<IStateMonitor, StateMonitor>(); + services.AddCors(options => options.AddPolicy("AllowAll", builder => builder.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader())); services.AddSingleton(JwtSigningKey); |
