1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

Use stdlib constants for HTTP methods instead of strings

This commit is contained in:
Frédéric Guillot 2020-06-21 21:13:00 -07:00
parent ec18abc97f
commit 8304666261
3 changed files with 109 additions and 107 deletions

View file

@ -83,7 +83,7 @@ func (m *middleware) handleAppSession(next http.Handler) http.Handler {
logger.Debug("[UI:AppSession] %s", session)
}
if r.Method == "POST" {
if r.Method == http.MethodPost {
formValue := r.FormValue("csrf")
headerValue := r.Header.Get("X-Csrf-Token")