Skip to content

Commit

Permalink
[fix bug] delete xff and xri
Browse files Browse the repository at this point in the history
  • Loading branch information
jweny committed Sep 15, 2021
1 parent 6b1cd2a commit 8c87248
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/reverse/director.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ func (reverse *Reverse) Director(host string) func(request *http.Request) {
request.Header.Del("Accept-Encoding")
request.Header.Del("Content-Encoding")

// 删除默认代理头
request.Header["X-Forwarded-For"] = nil
request.Header.Del("X-Real-Ip")

// 插件系统 rule 处理请求数据
if rules, ok := plugin.Plugins[host]; ok {
for _, rule := range rules.Rule {
Expand Down

0 comments on commit 8c87248

Please sign in to comment.