Allow up to 10 minutes for chatlog queries because they can be slow

This commit is contained in:
Elijah R 2024-06-02 13:14:51 -04:00
parent a9501b89f9
commit 0864abf309

View file

@ -23,7 +23,8 @@ public class HTTPServer
this.app.MapGet("/api/v1/list", (Delegate) VMListHandler);
this.app.MapGet("/api/v1/vminfo/{vm:required}", VmInfoHandler);
this.app.MapGet("/api/v1/screenshot/{vm:required}", VMScreenshotHandler);
this.app.MapGet("/api/v1/chatlogs", (Delegate) VMChatlogHandler);
// Allow up to 10 minutes for chatlog queries because they can be slow
this.app.MapGet("/api/v1/chatlogs", (Delegate)VMChatlogHandler).WithRequestTimeout(TimeSpan.FromMinutes(10));
this.app.MapGet("/api/v1/mod/iptousername/{ip:required}", IPToUsernameHandler);
this.app.MapGet("/api/v1/mod/usernametoip/{username:required}", UsernameToIPHandler);
this.app.Lifetime.ApplicationStarted.Register(this.onServerStarted);