Getting a 403 block when harvesting WMS from Geoserver

For some Geoserver harvesters Geonetwork is blocked. I get a 403 error.
However, the same Geoserver can be consumed without problem from QGIS, and a simple GetCapabilities request from a web browser returns a valid XML document. After some troubleshooting with the aid of ChatGPT, we have concluded this:
The GeoServer is rejecting requests unless the User-Agent mimics a browser (like Mozilla/5.0).
GeoNetwork’s harvester uses a non-browser user-agent, so it’s blocked with a 403 Forbidden
Is it possible to set the User-Agent in Geonetwork?
Compare these two requests
curl --ssl-no-revoke "https://mapsext.sgi.se/geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities"

curl --ssl-no-revoke -H "User-Agent: Mozilla/5.0" "https://mapsext.sgi.se/geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities"

I had a look in the GeoServer source code and did not find any specific check for Mozilla/5.0. I expect that the GeoServer is behind Apache or NginX configured to restrict user-agent.

In this case it does not make much sense as WMS is a general web service, not specifically intended for browser?

Looking at the welcome page there is an individual to contact: mats.oberg@sgi.se

Thanks. That was a good start. I was thinking that perhaps there was some variable in the Geonetwork harvester that could ‘pose’ it as Mozilla - or some other requestor. Asking providers about their server settings is a bit presumptuous, particularly since the wms service works as expected in all other aspects.