diff --git a/providers/http/http.go b/providers/http/http.go index 1b2a9fa..6a016ed 100644 --- a/providers/http/http.go +++ b/providers/http/http.go @@ -73,6 +73,11 @@ func funcError (status int, message any) (string, error) { } func funcRedirect (status int, pat string) (string, error) { + if status < 300 || status > 399 { + return "", fmt.Errorf( + "provided status code %d is not in the 3XX range", + status) + } return "", shttp.Redirect { Status: status, Location: pat,