Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUUIDShort ¶ added in v0.3.2
NewUUIDShort creates a new uuid and encodes it to a short form.
func ReadIP ¶
ReadIP implements a best effort approach to return the real client IP, it parses X-Real-IP and 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.
The purpose of this function is to produce an identifier of visitor. It does not matter wheather it is an real IP or not. Depending on the configuration, the returned IP address might be an encrypted hash string.
This implementation is derived from gin-gonic/gin.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.