Package jenkins.security
Class ResourceDomainConfiguration
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
jenkins.security.ResourceDomainConfiguration
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,Saveable
,Loadable
,OnMaster
@Extension(ordinal=199.0)
@Restricted(org.kohsuke.accmod.restrictions.Beta.class)
@Symbol("resourceRoot")
public final class ResourceDomainConfiguration
extends GlobalConfiguration
Configure the resource root URL, an alternative root URL to serve resources from
to not need Content-Security-Policy headers, which mess with desired complex output.
- Since:
- 2.200, unrestricted since 2.203
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondoCheckUrl
(String resourceRootUrlString) static ResourceDomainConfiguration
get()
getUrl()
static boolean
Returns true if and only if a domain has been configured to serve resource URLs fromstatic boolean
isResourceRequest
(jakarta.servlet.http.HttpServletRequest req) Returns true if and only if this is a request to URLs under the resource root URL.void
Methods inherited from class jenkins.model.GlobalConfiguration
all, configure, configure, getDescriptor, getGlobalConfigPage
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
ResourceDomainConfiguration
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public ResourceDomainConfiguration()
-
-
Method Details
-
doCheckUrl
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @POST public FormValidation doCheckUrl(@QueryParameter("url") String resourceRootUrlString) -
getUrl
-
setUrl
-
isResourceRequest
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static boolean isResourceRequest(jakarta.servlet.http.HttpServletRequest req) Returns true if and only if this is a request to URLs under the resource root URL. For this to be the case, the requested host and port (from the Host HTTP request header) must match what is configured for the resource root URL.- Parameters:
req
- the request to check- Returns:
- whether the request is a resource URL request
-
isResourceDomainConfigured
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static boolean isResourceDomainConfigured()Returns true if and only if a domain has been configured to serve resource URLs from- Returns:
- whether a domain has been configured
-
get
-