Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Engine = gin.Default()
Engine GIN
Functions ¶
func RemoteIP ¶
RemoteIP implements a best effort algorithm to return the real client IP, it parses X-BACKEND-BILI-REAL-IP or X-Real-IP or X-Forwarded-For in order to work properly with reverse-proxies such us: nginx or haproxy. Use X-Forwarded-For before X-Real-Ip as nginx uses X-Real-Ip with the proxy's IP. 所有的客户端请求必须设置请求头用以获取真实的 ip 地址
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.