ssl-proxy: 0.2.7 -> 0.2.7-unstable-2024-02-05
Remove patch as it has been applied in the ssl-proxy repo.
This commit is contained in:
parent
7aeb86c1fa
commit
069c5a74f1
2 changed files with 5 additions and 27 deletions
|
@ -2,20 +2,16 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "ssl-proxy";
|
||||
version = "0.2.7";
|
||||
version = "0.2.7-unstable-2024-02-05";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "suyashkumar";
|
||||
repo = "ssl-proxy";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-c9BLdDlkrg1z1QrO+vEAVyPtrV/nQcYlGXFmwfAOSpQ=";
|
||||
rev = "6b0f364be9bbf0de46520a6b85d30792fcc3cb80";
|
||||
hash = "sha256-tYAsz99YCOOEyxPp8Yp+PTn+q2Edir+xy4Vs0yyHWOQ=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-310K9ZSxy/OQ4HYFCcHQaj4NQwzATrOZ2YkhiSkhY5I=";
|
||||
|
||||
patches = [
|
||||
./go120-compatibility.patch
|
||||
];
|
||||
vendorHash = "sha256-PQ465+4AcH0wP4z2GsGdf/yABaGezaPq+eM0U2lu13o=";
|
||||
|
||||
checkTarget = "test";
|
||||
|
||||
|
@ -30,6 +26,6 @@ buildGoModule rec {
|
|||
license = licenses.mit;
|
||||
mainProgram = "ssl-proxy";
|
||||
maintainers = [ maintainers.konst-aa ];
|
||||
platforms = platforms.linux ++ platforms.darwin ++ platforms.windows ;
|
||||
platforms = platforms.linux ++ platforms.darwin ++ platforms.windows;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
Check whether User-Agent is defined before trying to override it
|
||||
|
||||
Since Go 1.20 [1], ReverseProxy no longer adds a User-Agent header to forwarded
|
||||
requests.
|
||||
|
||||
[1] https://github.com/golang/go/commit/f001df540b3fc66a475985c1b7c810e7df063c8f
|
||||
|
||||
--- a/reverseproxy/reverseproxy.go
|
||||
+++ b/reverseproxy/reverseproxy.go
|
||||
@@ -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", "")
|
||||
}
|
Loading…
Reference in a new issue