ipchecker

package
v0.3.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRealIP

func GetRealIP(r *http.Request) string

GetRealIP retrieves the user's real IP address. This method is suitable for HTTP services configured with load balancing. Using the ClientIP() method from gin.context might fetch a potentially spoofed X-Forwarded-For data by users. By using this method, as long as there is a load balancer configured, the correct IP can always be retrieved.

func GetRealIPFromGin added in v0.2.10

func GetRealIPFromGin(c *gin.Context) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL