Skip to content

Commit a9706b1

Browse files
chore: use http.MethodOptions instead of string literal (#164)
1 parent 28dfa40 commit a9706b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (cors *cors) applyCors(c *gin.Context) {
8787
return
8888
}
8989

90-
if c.Request.Method == "OPTIONS" {
90+
if c.Request.Method == http.MethodOptions {
9191
cors.handlePreflight(c)
9292
defer c.AbortWithStatus(cors.optionsResponseStatusCode)
9393
} else {

0 commit comments

Comments
 (0)