aboutsummaryrefslogtreecommitdiffstats
path: root/services/auth/auth.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/auth/auth.go')
-rw-r--r--services/auth/auth.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/auth/auth.go b/services/auth/auth.go
index f7deeb4c50..fb6612290b 100644
--- a/services/auth/auth.go
+++ b/services/auth/auth.go
@@ -62,14 +62,14 @@ func (a *authPathDetector) isAPIPath() bool {
// isAttachmentDownload check if request is a file download (GET) with URL to an attachment
func (a *authPathDetector) isAttachmentDownload() bool {
- return strings.HasPrefix(a.req.URL.Path, "/attachments/") && a.req.Method == "GET"
+ return strings.HasPrefix(a.req.URL.Path, "/attachments/") && a.req.Method == http.MethodGet
}
func (a *authPathDetector) isFeedRequest(req *http.Request) bool {
if !setting.Other.EnableFeed {
return false
}
- if req.Method != "GET" {
+ if req.Method != http.MethodGet {
return false
}
return a.vars.feedPathRe.MatchString(req.URL.Path) || a.vars.feedRefPathRe.MatchString(req.URL.Path)