소스 검색

查看一下请求头

icole 4 년 전
부모
커밋
b72953109c
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      utils/auth/light_auth.go

+ 1 - 0
utils/auth/light_auth.go

@@ -156,6 +156,7 @@ const (
 
 // RemoteIp 返回远程客户端的 IP,如 192.168.1.1
 func RemoteIp(req *http.Request) string {
+	fmt.Printf("+++++++++++++++%v", req.Header)
 	remoteAddr := req.RemoteAddr
 	if ip := req.Header.Get(XRealIP); ip != "" {
 		remoteAddr = ip