Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
admpub committed Nov 12, 2022
1 parent def5ab8 commit 869cfa0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,12 @@ func (this *Proxy) Listen() error {
this.ReserveProxy = &reverseproxy.NativeReverseProxy{PassingBrowsingURL: true}
engine = `Standard`
}

listenAddr := this.Port
if !strings.Contains(listenAddr, `:`) {
listenAddr = `:` + listenAddr
}
config := reverseproxy.ReverseProxyConfig{
Listen: `:` + this.Port,
Listen: listenAddr,
Router: router,
RequestIDHeader: "X-Request-ID",
ResponseBefore: func(ctx reverseproxy.Context) bool {
Expand Down

0 comments on commit 869cfa0

Please sign in to comment.