세션의 BrowserInfo 기록하는 부분에서 RemoteAddr체크는 로드밸런서 IP 찍히는 문제 때문에 제외한다.

This commit is contained in:
2023-06-15 14:12:26 +09:00
parent cbb95c6219
commit f4582299aa

View File

@ -11,7 +11,6 @@ import (
"io" "io"
"math/big" "math/big"
"math/rand" "math/rand"
"net"
"net/http" "net/http"
"os" "os"
"strings" "strings"
@ -693,17 +692,18 @@ func (mg *Maingate) GeneratePlatformLoginNonceKey() string {
func (mg *Maingate) GetUserBrowserInfo(r *http.Request) (string, error) { func (mg *Maingate) GetUserBrowserInfo(r *http.Request) (string, error) {
//=========== 브라우저 검증쪽은 앞으로 빼자 //=========== 브라우저 검증쪽은 앞으로 빼자
host, _, err := net.SplitHostPort(r.RemoteAddr) // host, _, err := net.SplitHostPort(r.RemoteAddr)
if err != nil { // if err != nil {
logger.Error("Error: RemoteAddr Split Error :", err) // logger.Error("Error: RemoteAddr Split Error :", err)
} // }
cookie, err := r.Cookie("ActionSquareSessionExtraInfo") cookie, err := r.Cookie("ActionSquareSessionExtraInfo")
if err != nil { if err != nil {
return "", err return "", err
} }
requestinfo := fmt.Sprintf("%s_%s", cookie.Value, host) //requestinfo := fmt.Sprintf("%s_%s", cookie.Value, host) //-- RemoteAddr체크는 로드밸런서 IP 찍히는 문제 때문에 제외한다.
requestinfo := fmt.Sprintf("%s_", cookie.Value)
return requestinfo, nil return requestinfo, nil
} }