-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report requests: use Sec-CH-UA? #246
Comments
General question: |
Adding to this question, if the reporting endpoint returns a |
I'm not sure what the current interaction between CH and reporting is, although since it's specced in terms of fetch, my guess is that:
I suspect that the high entropy client hints should only apply to V1 reports, configured with the Reporting-Endpoints header. The batching of reports that happens with V0 might make it impossible to know whether a particular POST request should have hints or not, since it could include reports from different documents. @yoavweiss can you confirm this? |
1-3 make sense to me. @maudnals - are you not seeing the 1-4 behavior? /cc @miketaylr |
I examined the HTTP header sent with reports on a demo and it was following: {
connection: 'close',
'x-forwarded-for': '217.178.137.117,::ffff:10.10.11.202,::ffff:10.10.80.238',
'x-forwarded-proto': 'https,http,http',
'x-forwarded-port': '443,80,80',
host: 'reporting-endpoint.glitch.me',
'content-length': '1115',
'content-type': 'application/reports+json',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ' +
'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4878.0 ' +
'Safari/537.36',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'en-US,en;q=0.9,ja;q=0.8',
'x-forwarded-host': 'reporting-endpoint.glitch.me',
traceparent: '00-378e03f773b3476fae213404d3650c96-acca84b4eb508495-01'
} It was Chrome Canary Version 100.0.4878.0 (Official Build) canary (x86_64). |
Client Hints shouldn't differ based on Desktop mode/etc, correct? So while we have |
I've reviewed the current behavior here, and it doesn't appear (in Chrome 117) that any Client Hint HTTP headers are sent with Reporting API reports, even to a same-origin destination where Simple repro: https://nicj.net/dev/reporting-api/ This demo page generates <?php
header('Accept-CH: sec-ch-ua-platform-version');
header('Report-To: {"max_age":3600,"endpoints":[{"url":"https://nicj.net/dev/reporting-api/report.php"}],"include_subdomains":true}');
header('NEL: {"report_to": "default", "max_age": 2592000}');
?>
<!DOCTYPE html>
<html><head><title>Reporting API test w/ Client Hints</title></head>
<body>
<h1>Reporting API test w/ Client Hints</h1>
<p>The image below is a 404</p>
<img src='missing.png'>
</body>
</html> The initial HTML navigation request (after a reload) sends the headers you'd expect (abbreviated list):
However the Reporting API reports the same (frozen) Here's the complete header set:
|
Created https://crbug.com/1483711 These reports are spec'd in terms of Fetch, and should have the same logic applied as other fetches. |
As of today, requests sent by the browser to the defined endpoint(s) also include a user-agent field, as described here.
With user-agent string reduction in mind, what are the plans for the user agent info in report requests?
Will the approach here change as well?
Sec-CH-UA
?Example values:
By default, Chrome already returns all of these in regular requests.
Benefits of this could be twofold:
The text was updated successfully, but these errors were encountered: