summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Loader
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Loader')
-rw-r--r--Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Loader/ResourceLoader.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp
index 4d438aadb0..cd3aaeed2d 100644
--- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp
+++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp
@@ -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)
{
}
diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.h b/Userland/Libraries/LibWeb/Loader/ResourceLoader.h
index 02fda51250..74ac265f72 100644
--- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.h
+++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.h
@@ -37,6 +37,8 @@ class Client;
namespace Web {
+constexpr auto default_user_agent = "Mozilla/4.0 (SerenityOS; x86) LibWeb+LibJS (Not KHTML, nor Gecko) LibWeb";
+
class ResourceLoader : public Core::Object {
C_OBJECT(ResourceLoader)
public:
@@ -55,6 +57,7 @@ public:
Protocol::Client& protocol_client() { return *m_protocol_client; }
const String& user_agent() const { return m_user_agent; }
+ void set_user_agent(const String& user_agent) { m_user_agent = user_agent; }
void clear_cache();