mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Fix ASF-ui, closes https://github.com/JustArchiNET/ASF-ui/issues/757
This commit is contained in:
@@ -73,13 +73,16 @@ namespace ArchiSteamFarm.IPC {
|
|||||||
// Add support for response compression
|
// Add support for response compression
|
||||||
app.UseResponseCompression();
|
app.UseResponseCompression();
|
||||||
|
|
||||||
|
// Add support for websockets used in /Api/NLog
|
||||||
|
app.UseWebSockets();
|
||||||
|
|
||||||
|
// We're using index for URL routing in our static files so re-execute all non-API calls on /
|
||||||
|
app.UseWhen(context => !context.Request.Path.StartsWithSegments("/Api", StringComparison.OrdinalIgnoreCase), appBuilder => appBuilder.UseStatusCodePagesWithReExecute("/"));
|
||||||
|
|
||||||
// We need static files support for IPC GUI
|
// We need static files support for IPC GUI
|
||||||
app.UseDefaultFiles();
|
app.UseDefaultFiles();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
|
|
||||||
// We need WebSockets support for /Api/Log
|
|
||||||
app.UseWebSockets();
|
|
||||||
|
|
||||||
#if !NETFRAMEWORK
|
#if !NETFRAMEWORK
|
||||||
// Add support for routing
|
// Add support for routing
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
@@ -106,9 +109,6 @@ namespace ArchiSteamFarm.IPC {
|
|||||||
|
|
||||||
// Use friendly swagger UI
|
// Use friendly swagger UI
|
||||||
app.UseSwaggerUI(options => options.SwaggerEndpoint("/swagger/" + SharedInfo.ASF + "/swagger.json", SharedInfo.ASF + " API"));
|
app.UseSwaggerUI(options => options.SwaggerEndpoint("/swagger/" + SharedInfo.ASF + "/swagger.json", SharedInfo.ASF + " API"));
|
||||||
|
|
||||||
// We're using index for URL routing in our static files so re-execute all non-API calls on /
|
|
||||||
app.UseWhen(context => !context.Request.Path.StartsWithSegments("/Api", StringComparison.OrdinalIgnoreCase), appBuilder => appBuilder.UseStatusCodePagesWithReExecute("/"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ConfigureServices(IServiceCollection services) {
|
public void ConfigureServices(IServiceCollection services) {
|
||||||
|
|||||||
Reference in New Issue
Block a user