Skip to content

Commit

Permalink
fix Port lookup, update go.mod version
Browse files Browse the repository at this point in the history
  • Loading branch information
ruckc committed Aug 3, 2024
1 parent fe3dc4d commit 2b3ca3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/goproxygo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func reverseProxyHandler(destination *url.URL) *httputil.ReverseProxy {
req.Header.Set("Origin", fmt.Sprintf("%s://%s", destination.Scheme, destination.Host))
req.Header.Set("X-Forwarded-Proto", req.URL.Scheme)
req.Header.Set("X-Forwarded-Host", req.Host)
req.Header.Set("X-Forwarded-Port", req.URL.Port)
req.Header.Set("X-Forwarded-Port", req.URL.Port())
req.Header.Set("Host", req.Host)
req.Host = req.URL.Host
req.URL.Scheme = destination.Scheme
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/ruckc/goproxygo

go 1.18
go 1.22

0 comments on commit 2b3ca3f

Please sign in to comment.