Add User_agent header for documentation links checker

Closes #42164

(cherry picked from commit 93791f67fba08c15be229d1acf7f573d305ccc35)

Signed-off-by: rmartinc <rmartinc@redhat.com>
Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
Co-authored-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
Ricardo Martin 2025-09-10 11:21:24 +02:00 committed by GitHub
parent 2f7ebfddef
commit 373e99e398
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 6 deletions

View File

@ -81,6 +81,7 @@ public class HttpUtils {
// add common headers that are needed by some pages
method.addHeader(HttpHeaders.ACCEPT_LANGUAGE, "en-US,en;q=0.9");
method.addHeader(HttpHeaders.ACCEPT, "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
method.addHeader(HttpHeaders.USER_AGENT, "Java/" + System.getProperty("java.version") + " (https://www.keycloak.org; keycloak-dev@googlegroups.com)");
client.execute(method, responseHandler);
} catch (Exception e) {
response.setError("exception " + e.getMessage());

View File

@ -39,9 +39,5 @@ https://stackapps.com/apps/oauth/register
# Failing because of broken certificate, can likely be restored later.
https://docs.kantarainitiative.org*
https://saml.xml.org*
# To be removed once KC 26.2 has been released
https://www.keycloak.org/server/caching#_securing_transport_stacks
https://www.keycloak.org/observability/grafana-dashboards
https://www.keycloak.org/securing-apps/token-exchange*
https://www.keycloak.org/operator/rolling-updates
https://www.keycloak.org/server/update-compatibility#rolling-updates-for-patch-releases
# To be removed once KC 26.4 has been released
https://www.keycloak.org/securing-apps/specifications