Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultIPWhitelistConfig is default configuration DefaultIPWhitelistConfig = IPWhitelistConfig{ Enable: true, } // GIPFilter is a global gIPFilter instance GIPFilter = &gIPFilter{ IsInitialized: false, } )
Functions ¶
func IPWhitelist ¶
func IPWhitelist(ipList []string) echo.MiddlewareFunc
IPWhitelist receives ip list and returns echo.MiddlewareFunc
func IPWhitelistWithConfig ¶
func IPWhitelistWithConfig(config IPWhitelistConfig) echo.MiddlewareFunc
IPWhitelistWithConfig receives config instance and returns echo.MiddleFunc
func ServerHeader ¶
func ServerHeader() echo.MiddlewareFunc
ServerHeader middleware adds a `Server` header to the response.
Types ¶
type IPWhitelistConfig ¶
IPWhitelistConfig defines the config for IPWhitelist middleware.
Click to show internal directories.
Click to hide internal directories.