Package org.jenkinsci.plugins.gitlablogo
Class GitLabAvatarContributor
java.lang.Object
org.jenkinsci.plugins.gitlablogo.GitLabAvatarContributor
Allows GitLab avatar URLs to be loaded in Jenkins UI by adding them to the
Content Security Policy (CSP) allowlist.
This extension uses duck typing to work with jenkins.security.csp.AvatarContributorAllows which is available in Jenkins 2.539+. On older Jenkins versions, this class is harmless and will be ignored.
- Since:
- 1.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a space-separated list of URLs to add to the CSP img-src directive.
-
Constructor Details
-
GitLabAvatarContributor
public GitLabAvatarContributor()
-
-
Method Details
-
getUrlAllowList
Returns a space-separated list of URLs to add to the CSP img-src directive. This allows GitLab project avatars to be displayed in Jenkins 2.539+.This method includes both gitlab.com (SaaS) and any configured self-hosted GitLab endpoint from the plugin's global configuration.
Method signature matches jenkins.security.csp.AvatarContributorAllows#getUrlAllowList()- Returns:
- Space-separated list of allowed URL patterns for GitLab domains
-