Skip to content

Commit

Permalink
style: improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Paxxs committed Feb 26, 2022
1 parent d0b3637 commit 26602d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion get_real_ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const (
xForwardedFor = "X-Forwarded-For"
)

// Proxy 配置文件中的数组结构
type Proxy struct {
ProxyHeadername string `yaml:"proxyHeadername"`
ProxyHeadervalue string `yaml:"proxyHeadervalue"`
Expand All @@ -29,13 +30,14 @@ func CreateConfig() *Config {
return &Config{}
}

// Define plugin
// GetRealIP Define plugin
type GetRealIP struct {
next http.Handler
name string
proxy []Proxy
}

// New creates and returns a new realip plugin instance.
func New(ctx context.Context, next http.Handler, config *Config, name string) (http.Handler, error) {
log.Printf("☃️ All Config:'%v',Proxy Settings len: '%d'", config, len(config.Proxy))

Expand Down

0 comments on commit 26602d6

Please sign in to comment.