Include version number and website URL in HTTP User-Agent header#1914
Merged
Include version number and website URL in HTTP User-Agent header#1914
Conversation
|
miguelvaara
approved these changes
Jan 29, 2026
Contributor
miguelvaara
left a comment
There was a problem hiding this comment.
Everything seems to be working well. Thanks @osma! I think you can go ahead and merge.
miguelvaara
reviewed
Jan 29, 2026
Contributor
miguelvaara
left a comment
There was a problem hiding this comment.
I also used a small PHP script to monitor traffic while loading mappings on the concept page and the result was as follows:
User-Agent: Skosmos/3.1-dev (https://skosmos.org/)
Accept: application/sparql-results+json,application/sparql-results+xml;q=0.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Reasons for creating this PR
Previously, Skosmos only used the User-Agent header
Skosmoswithout any further information. This does not follow relevant recommendations and conventions, and may cause difficulties in analyzing and controlling web traffic.This PR adds the version number and https://skosmos.org URL to the User-Agent header used in SPARQL, Linked Data, LOC and WDQS requests. A PHPUnit test verifies that it is generated properly.
The "Skosmos" user-agent header was implemented in #1691. Back then we decided not to include the version number:
Link to relevant issue(s), if any
Description of the changes in this PR
Known problems or uncertainties in this PR
I didn't include a test that would verify that the user-agent setting is actually used in HTTP requests. That would probably be possible with Cypress (by intercepting requests) but IMHO it's a lot of work for little benefit.
Checklist
.sr-onlyclass, color contrast)