In T257893: [EPIC] Support User-Agent Client Hints header in CheckUser we decided that we want to request high entropy user agent data via the client hints header for actions that are interesting to Extension:CheckUser: editing, creating an account, logging in, etc.
In this task, we'll do the work to implement setting the header.
- For page requests, we should be able to use BeforePageDisplay hook in Extension:CheckUser to see if the user is on a page that meets criteria for requesting client hint data on subsequent requests.
- For API editing, we use the postEdit hook and the client-side JS API getHighEntropyValues(), and POST the results to an endpoint in CheckUser extension, /checkuser/v0/useragent-clienthints/{revision}
Ensure client hints header is requested when user begins these workflows:
- [web] Special:CreateAccount
- [web] Special:UserLogin
- [web] Special:UserLogout
- [web] Special:PasswordReset
- [web] Special:EmailUser
- [web]
?action=edit/undo/rollback?action=history (for rollback and undo) - [API] edit handled via postEdit mw.hook (as is non-API editing)