fix: enable usestdlibvars linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
@ -436,7 +436,7 @@ func (ac *accessController) ServeHTTP(rw http.ResponseWriter, req *http.Request)
|
||||
addCORSHeader(rw, origin)
|
||||
}
|
||||
|
||||
if req.Method == "OPTIONS" {
|
||||
if req.Method == http.MethodOptions {
|
||||
rw.WriteHeader(http.StatusOK)
|
||||
return
|
||||
}
|
||||
@ -486,7 +486,7 @@ func (ch *corsHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
|
||||
addCORSHeader(rw, origin)
|
||||
}
|
||||
|
||||
if req.Method == "OPTIONS" {
|
||||
if req.Method == http.MethodOptions {
|
||||
rw.WriteHeader(http.StatusOK)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user