Skip to content

Commit

Permalink
Bump to go 1.21
Browse files Browse the repository at this point in the history
Change to reverseproxy.go to make tests pass came from @marsam on GitHub.
  • Loading branch information
konst-aa committed Jan 26, 2024
1 parent 3108e51 commit cf138bf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM golang:1.18.3-alpine
WORKDIR /go/src/github.com/suyashkumar/ssl-proxy
RUN apk add --no-cache make git zip
RUN go get -u github.com/golang/dep/cmd/dep
COPY . .
RUN go get -u github.com/golang/dep/cmd/dep
RUN make
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/suyashkumar/ssl-proxy

go 1.18
go 1.21

require (
github.com/stretchr/testify v1.7.0
Expand Down
2 changes: 1 addition & 1 deletion reverseproxy/reverseproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func newDirector(target *url.URL, extraDirector func(*http.Request)) func(*http.
} else {
req.URL.RawQuery = targetQuery + "&" + req.URL.RawQuery
}
if _, ok := req.Header["User-Agent"]; !ok {
if req.Header.Get("User-Agent") != "" {
// explicitly disable User-Agent so it's not set to default value
req.Header.Set("User-Agent", "")
}
Expand Down

0 comments on commit cf138bf

Please sign in to comment.