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.SelfNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoCheckUrl(String resourceRootUrlString) static ResourceDomainConfigurationget()getUrl()static booleanReturns true if and only if a domain has been configured to serve resource URLs fromstatic booleanisResourceRequest(javax.servlet.http.HttpServletRequest req) Returns true if and only if this is a request to URLs under the resource root URL.voidMethods inherited from class jenkins.model.GlobalConfiguration
all, configure, getDescriptor, getGlobalConfigPageMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, 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, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, 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(javax.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
-