From 2846748b26a8b46fb7e99a04e27dfd9753fe3abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferdinand=20M=C3=BCtsch?= Date: Tue, 9 Mar 2021 23:15:35 +0100 Subject: [PATCH] hotfix: remove user agent check for shields.io --- routes/compat/shields/v1/badge.go | 6 ------ version.txt | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/routes/compat/shields/v1/badge.go b/routes/compat/shields/v1/badge.go index cf57082..4e3ac1b 100644 --- a/routes/compat/shields/v1/badge.go +++ b/routes/compat/shields/v1/badge.go @@ -9,7 +9,6 @@ import ( "github.com/muety/wakapi/utils" "net/http" "regexp" - "strings" "time" ) @@ -52,11 +51,6 @@ func (h *BadgeHandler) Get(w http.ResponseWriter, r *http.Request) { intervalReg := regexp.MustCompile(intervalPattern) entityFilterReg := regexp.MustCompile(entityFilterPattern) - if userAgent := r.Header.Get("user-agent"); !strings.HasPrefix(userAgent, "Shields.io/") && !h.config.IsDev() { - w.WriteHeader(http.StatusForbidden) - return - } - var filterEntity, filterKey string if groups := entityFilterReg.FindStringSubmatch(r.URL.Path); len(groups) > 2 { filterEntity, filterKey = groups[1], groups[2] diff --git a/version.txt b/version.txt index 7a429d6..8407e26 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.24.6 +1.24.7