Browser+LibWeb: Add support for spoofing the browser user agent

This is helpful when testing certain sites like twitter.com which
display differently based on the user agent.
This commit is contained in:
Idan Horowitz 2021-04-14 15:13:51 +03:00 committed by Andreas Kling
parent aab99d5945
commit bc9cd55da4
Notes: sideshowbarker 2024-07-18 20:19:57 +09:00
5 changed files with 59 additions and 1 deletions

View file

@ -48,7 +48,7 @@ ResourceLoader& ResourceLoader::the()
ResourceLoader::ResourceLoader()
: m_protocol_client(Protocol::Client::construct())
, m_user_agent("Mozilla/4.0 (SerenityOS; x86) LibWeb+LibJS (Not KHTML, nor Gecko) LibWeb")
, m_user_agent(default_user_agent)
{
}