ssl-proxy: unpin go
This commit is contained in:
parent
c8c45511cd
commit
e027727e75
@ -13,6 +13,10 @@ buildGoModule rec {
|
||||
|
||||
vendorHash = "sha256-310K9ZSxy/OQ4HYFCcHQaj4NQwzATrOZ2YkhiSkhY5I=";
|
||||
|
||||
patches = [
|
||||
./go120-compatibility.patch
|
||||
];
|
||||
|
||||
checkTarget = "test";
|
||||
|
||||
meta = with lib; {
|
||||
|
18
pkgs/tools/networking/ssl-proxy/go120-compatibility.patch
Normal file
18
pkgs/tools/networking/ssl-proxy/go120-compatibility.patch
Normal file
@ -0,0 +1,18 @@
|
||||
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", "")
|
||||
}
|
@ -42031,9 +42031,7 @@ with pkgs;
|
||||
|
||||
yazi = callPackage ../applications/file-managers/yazi { inherit (darwin.apple_sdk.frameworks) Foundation; };
|
||||
|
||||
ssl-proxy = callPackage ../tools/networking/ssl-proxy {
|
||||
buildGoModule = buildGo119Module; # build fails with 1.20
|
||||
};
|
||||
ssl-proxy = callPackage ../tools/networking/ssl-proxy { };
|
||||
|
||||
code-maat = callPackage ../development/tools/code-maat {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user