Return not found for more recently deleted servers, too
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"net/http/httptrace"
|
||||
"net/url"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/go-retryablehttp"
|
||||
"github.com/labstack/echo/v4"
|
||||
@@ -49,6 +50,9 @@ func (srv *Server) graphImage(c echo.Context) error {
|
||||
if serverData.ID == 0 {
|
||||
return c.String(http.StatusNotFound, "not found")
|
||||
}
|
||||
if serverData.DeletionAge(7 * 24 * time.Hour) {
|
||||
return c.String(http.StatusNotFound, "not found")
|
||||
}
|
||||
|
||||
if serverData.Ip != serverID {
|
||||
return c.Redirect(308, fmt.Sprintf("/graph/%s/offset.png", serverData.Ip))
|
||||
|
||||
Reference in New Issue
Block a user