Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
Sakurasan committed Nov 17, 2024
1 parent 78e3be4 commit 768f4cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ func HandleProxy(c *gin.Context) {
var (
localuser bool
)
// 显式处理 OPTIONS 请求
if c.Request.Method == "OPTIONS" {
c.AbortWithStatus(204)
return
}

auth := c.Request.Header.Get("Authorization")
if len(auth) > 7 && auth[:7] == "Bearer " {
localuser = store.IsExistAuthCache(auth[7:])
Expand Down

0 comments on commit 768f4cc

Please sign in to comment.