diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-23 23:03:57 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-23 23:03:57 +0800 |
commit | c752e8159e7dcfb531bbc1a7a190f61c7c0072cc (patch) | |
tree | c67ee071d89fd29858361b2fba0f972691bba035 | |
parent | main.go: Log each condition differently (diff) | |
download | powxy-c752e8159e7dcfb531bbc1a7a190f61c7c0072cc.tar.gz powxy-c752e8159e7dcfb531bbc1a7a190f61c7c0072cc.tar.zst powxy-c752e8159e7dcfb531bbc1a7a190f61c7c0072cc.zip |
identifier.go: Remove many elements (some mobile browsers mess it up?)
-rw-r--r-- | identifier.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/identifier.go b/identifier.go index 6da0e7c..785f408 100644 --- a/identifier.go +++ b/identifier.go @@ -23,10 +23,10 @@ func makeIdentifierMAC(request *http.Request) (identifier []byte, mac []byte) { h := sha256.New() h.Write(timeBuf) h.Write(stringToBytes(remoteIP)) - h.Write(stringToBytes(request.Header.Get("User-Agent"))) - h.Write(stringToBytes(request.Header.Get("Accept-Encoding"))) - h.Write(stringToBytes(request.Header.Get("Accept-Language"))) - h.Write(privkeyHash) + // h.Write(stringToBytes(request.Header.Get("User-Agent"))) + // h.Write(stringToBytes(request.Header.Get("Accept-Encoding"))) + // h.Write(stringToBytes(request.Header.Get("Accept-Language"))) + // h.Write(privkeyHash) identifier = h.Sum(identifier) if len(identifier) != sha256.Size { panic("unexpected buffer length after hashing contents") |