Only set OS header value for query from router itself

So queries from clients won't be mis-recognized as query from router in
case of client metadata is in progress of collecting.
This commit is contained in:
Cuong Manh Le
2024-04-05 17:59:25 +07:00
committed by Cuong Manh Le
parent b002dff624
commit 6f12667e8c

1
doh.go
View File

@@ -165,7 +165,6 @@ func addHeader(ctx context.Context, req *http.Request, uc *UpstreamConfig) {
// newControlDHeaders returns DoH/Doh3 HTTP request headers for ControlD upstream.
func newControlDHeaders(ci *ClientInfo) http.Header {
header := make(http.Header)
header.Set(dohOsHeader, dohOsHeaderValue)
if ci.Mac != "" {
header.Set(dohMacHeader, ci.Mac)
}