mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-16 06:20:34 +00:00
Misc
This commit is contained in:
@@ -248,6 +248,11 @@ internal static class ArchiKestrel {
|
||||
// Add support for websockets that we use e.g. in /Api/NLog
|
||||
app.UseWebSockets();
|
||||
|
||||
// Add support for output caching
|
||||
if (ASF.GlobalConfig?.OptimizationMode != GlobalConfig.EOptimizationMode.MinMemoryUsage) {
|
||||
app.UseOutputCache();
|
||||
}
|
||||
|
||||
// Add additional endpoints provided by plugins
|
||||
foreach (IWebServiceProvider plugin in PluginsCore.ActivePlugins.OfType<IWebServiceProvider>()) {
|
||||
try {
|
||||
@@ -338,6 +343,11 @@ internal static class ArchiKestrel {
|
||||
services.AddCors(static options => options.AddDefaultPolicy(static policyBuilder => policyBuilder.AllowAnyOrigin()));
|
||||
}
|
||||
|
||||
// Add support for output caching
|
||||
if (ASF.GlobalConfig?.OptimizationMode != GlobalConfig.EOptimizationMode.MinMemoryUsage) {
|
||||
services.AddOutputCache();
|
||||
}
|
||||
|
||||
// Add support for OpenAPI, responsible for automatic API documentation generation
|
||||
services.AddOpenApi(
|
||||
SharedInfo.ASF, static options => {
|
||||
|
||||
Reference in New Issue
Block a user