mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:08:12 +00:00
LibWeb: Honor User-Agent spoofing in Fetch headers
This makes spoofing consistent between legacy ResourceLoader loads, Fetch loads, and the JavaScript `navigator` APIs.
This commit is contained in:
parent
a30d263522
commit
89da988da1
3 changed files with 4 additions and 4 deletions
|
@ -882,10 +882,10 @@ Optional<RangeHeaderValue> parse_single_range_header_value(ReadonlyBytes value)
|
|||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#default-user-agent-value
|
||||
ErrorOr<ByteBuffer> default_user_agent_value()
|
||||
ByteBuffer default_user_agent_value()
|
||||
{
|
||||
// A default `User-Agent` value is an implementation-defined header value for the `User-Agent` header.
|
||||
return ByteBuffer::copy(default_user_agent.bytes());
|
||||
return MUST(ByteBuffer::copy(ResourceLoader::the().user_agent().bytes()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue