[epiphany/mcatanzaro/user-agent-branding] user-agent: restore application branding




commit 65cbf8adcf3e75d2e47ae554fdc137bd026a8826
Author: Michael Catanzaro <mcatanzaro redhat com>
Date:   Fri May 27 16:16:53 2022 -0500

    user-agent: restore application branding
    
    This is part of a deal with Google to stop accounts.google.com from
    discriminating against us. It's a very risky change, but we'll try it
    for now and make a list of websites that it breaks.
    
    Historical background, in order of recency:
    
    https://bugs.webkit.org/show_bug.cgi?id=240041
    https://bugs.webkit.org/show_bug.cgi?id=222978
    https://bugs.webkit.org/show_bug.cgi?id=222039#c5
    https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/595
    
    Also, remove the web app branding, since the risk outweighs the reward
    and I don't want a separate set of bugs in web app mode. I believe only
    one website was using this:
    
    https://bugzilla.gnome.org/show_bug.cgi?id=767123

 lib/ephy-user-agent.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/lib/ephy-user-agent.c b/lib/ephy-user-agent.c
index 52cbc8282..7803ad818 100644
--- a/lib/ephy-user-agent.c
+++ b/lib/ephy-user-agent.c
@@ -31,7 +31,6 @@ ephy_user_agent_get (void)
 {
   static char *user_agent = NULL;
   WebKitSettings *settings;
-  gboolean web_app;
 
   if (user_agent)
     return user_agent;
@@ -43,12 +42,9 @@ ephy_user_agent_get (void)
     g_free (user_agent);
   }
 
-  web_app = ephy_profile_dir_is_web_application ();
-
   settings = webkit_settings_new ();
-  user_agent = g_strdup_printf ("%s%s",
-                                webkit_settings_get_user_agent (settings),
-                                web_app ? " (Web App)" : "");
+  webkit_settings_set_user_agent_with_application_details (settings, "Epiphany", "605.1.15");
+  user_agent = g_strdup (webkit_settings_get_user_agent (settings));
   g_object_unref (settings);
 
   return user_agent;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]