feat(scrub): add comprehensive browser fingerprint and client identity header scrubbing
This commit is contained in:
@@ -149,13 +149,7 @@ func (e *AntigravityExecutor) HttpRequest(ctx context.Context, auth *cliproxyaut
|
||||
}
|
||||
httpReq.Close = true
|
||||
httpReq.Header.Del("Accept")
|
||||
httpReq.Header.Del("X-Forwarded-For")
|
||||
httpReq.Header.Del("X-Forwarded-Host")
|
||||
httpReq.Header.Del("X-Forwarded-Proto")
|
||||
httpReq.Header.Del("X-Forwarded-Port")
|
||||
httpReq.Header.Del("X-Real-IP")
|
||||
httpReq.Header.Del("Forwarded")
|
||||
httpReq.Header.Del("Via")
|
||||
scrubProxyAndFingerprintHeaders(httpReq)
|
||||
httpClient := newAntigravityHTTPClient(ctx, e.cfg, auth, 0)
|
||||
return httpClient.Do(httpReq)
|
||||
}
|
||||
@@ -1405,13 +1399,7 @@ func (e *AntigravityExecutor) buildRequest(ctx context.Context, auth *cliproxyau
|
||||
httpReq.Header.Set("Content-Type", "application/json")
|
||||
httpReq.Header.Set("Authorization", "Bearer "+token)
|
||||
httpReq.Header.Set("User-Agent", resolveUserAgent(auth))
|
||||
httpReq.Header.Del("X-Forwarded-For")
|
||||
httpReq.Header.Del("X-Forwarded-Host")
|
||||
httpReq.Header.Del("X-Forwarded-Proto")
|
||||
httpReq.Header.Del("X-Forwarded-Port")
|
||||
httpReq.Header.Del("X-Real-IP")
|
||||
httpReq.Header.Del("Forwarded")
|
||||
httpReq.Header.Del("Via")
|
||||
scrubProxyAndFingerprintHeaders(httpReq)
|
||||
if host := resolveHost(base); host != "" {
|
||||
httpReq.Host = host
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user