Skip to content

Commit 2b3ca3f

Browse files
committedAug 3, 2024·
fix Port lookup, update go.mod version
1 parent fe3dc4d commit 2b3ca3f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎cmd/goproxygo/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func reverseProxyHandler(destination *url.URL) *httputil.ReverseProxy {
6868
req.Header.Set("Origin", fmt.Sprintf("%s://%s", destination.Scheme, destination.Host))
6969
req.Header.Set("X-Forwarded-Proto", req.URL.Scheme)
7070
req.Header.Set("X-Forwarded-Host", req.Host)
71-
req.Header.Set("X-Forwarded-Port", req.URL.Port)
71+
req.Header.Set("X-Forwarded-Port", req.URL.Port())
7272
req.Header.Set("Host", req.Host)
7373
req.Host = req.URL.Host
7474
req.URL.Scheme = destination.Scheme

‎go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/ruckc/goproxygo
22

3-
go 1.18
3+
go 1.22

0 commit comments

Comments
 (0)
Please sign in to comment.