Status checker endpoint

This commit is contained in:
2024-07-27 01:10:26 +08:00
parent fbfb340058
commit 82305206b0
2 changed files with 8 additions and 0 deletions

View File

@ -33,7 +33,11 @@ func forwardServiceRequest(c *fiber.Ctx) error {
ogUrl := c.Request().URI().String()
url := c.OriginalURL()
prevUrl := url
url = strings.Replace(url, "/srv/"+serviceType, "/api", 1)
if prevUrl == url {
url = strings.Replace(url, "/cgi/"+serviceType, "/api", 1)
}
url = "http://" + *service.HttpAddr + url
log.Debug().