mirror of
https://github.com/snowykami/server-status-server.git
synced 2025-09-10 05:56:26 +00:00
✨ [web] 删除不再使用的文件并新增超时处理接口
This commit is contained in:
@ -59,7 +59,12 @@ func OnGetStaticFile(ctx context.Context, c *app.RequestContext) {
|
||||
} else if strings.HasSuffix(fp, ".svg") {
|
||||
contentType = "image/svg+xml"
|
||||
}
|
||||
|
||||
log.Info("Get file: ", fp, " with content type: ", contentType)
|
||||
c.Data(200, contentType, data)
|
||||
}
|
||||
|
||||
func OnGetTimeout(ctx context.Context, c *app.RequestContext) {
|
||||
log.Info("Timeout")
|
||||
c.JSON(200, "Timeout")
|
||||
ctx.Done()
|
||||
}
|
||||
|
Reference in New Issue
Block a user