Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lucky-lee committed Aug 19, 2020
1 parent f7ca888 commit 88f133a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions ginReq/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@ package ginReq

import (
"github.com/gin-gonic/gin"
"net/http"
)

//header auth get
func HeaderAuth(c *gin.Context) string {
auth := c.Request.Header.Get("Authorization")
if auth == "" {
if !c.IsAborted() {
c.AbortWithStatusJSON(http.StatusForbidden, "err")
}

return ""
}
return auth
Expand Down

0 comments on commit 88f133a

Please sign in to comment.