Problem/Motivation

Currently there is no dedicated user agent string used by Project Browser: https://git.drupalcode.org/project/project_browser/-/blob/2.0.x/src/Plug...

It would be useful to use a unique user agent string, so that (assuming other's don't copy that source) we would have a good heuristic to tell apart PB calls from other API calls on drupal.org and have some good metrics for actual usage of PB.

Steps to reproduce

Proposed resolution

Add a unique query string, for example: "Drupal Project Browser 2.0.0-beta1" (adding the version number would probably be really useful). Maybe even "Drupal Project Browser 2.0.0-beta1 (on Drupal 11.1.3)" or somesuch?

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

gábor hojtsy created an issue. See original summary.

gábor hojtsy’s picture

Issue summary: View changes

omkar-pd made their first commit to this issue’s fork.

omkar-pd’s picture

Status: Active » Needs review
fjgarlin’s picture

We already use a "versionless" user agent in some parts, like here: https://git.drupalcode.org/project/project_browser/-/blob/2.0.x/scripts/...
curl_setopt($ch, CURLOPT_USERAGENT, 'Curl.ProjectBrowser');

So I suggest to modify it slightly so we can do a regex that covers this and the new one with the version. I'll make a suggestion in the MR.

fjgarlin’s picture

Actually, as they have different purposes. We can leave it like that.

fjgarlin’s picture

I made a suggestion in the MR and also added a @todo as PB will be part of core eventually.

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

+1

chrisfromredfin made their first commit to this issue’s fork.

chrisfromredfin’s picture

Status: Reviewed & tested by the community » Fixed

Cool! We can leave that todo... maybe some day we'll be there, or someday we'll just remove it. ;)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.