public class JiraBaseUrlCDNStrategy extends Object implements com.atlassian.plugin.webresource.cdn.CDNStrategy
/my/resource.js
will be transformed to be served from //node-1.cdnhost.com/my.jirahost.com/my/resource.js
or
//node-2.cdnhost.com/my.jirahost.com/my/resource.js
(depending on the number of hosts configured).
jira.baseurl.cdn.enabled
to true to enable
jira.baseurl.cdn.prefix
to the set of CDN prefixes to use (comma separated),
e.g. //node-1.cdnhost.com
or //node-1.cdnhost.com,//node-2.cdnhost.com
. This must not end
with a trailing slash. The JIRA hostname (determined by the jira.baseurl
application property) is
appended to the prefix as the first path component, i.e. //my.cdnhost.com/my.jirahost.com
.
The benefit of this strategy over JiraPrefixCDNStrategy
is that it
allows the JIRA hostname to be changed at runtime and for that to be dynamically incorporated into the CDN base URL
to one or more CDN proxies to service multiple JIRA instances.
Constructor and Description |
---|
JiraBaseUrlCDNStrategy(ApplicationProperties applicationProperties,
Optional<com.atlassian.plugin.webresource.prebake.PrebakeConfig> prebakeConfig) |
Modifier and Type | Method and Description |
---|---|
Optional<com.atlassian.plugin.webresource.prebake.PrebakeConfig> |
getPrebakeConfig() |
boolean |
supportsCdn() |
String |
transformRelativeUrl(String relativeUrl) |
public JiraBaseUrlCDNStrategy(ApplicationProperties applicationProperties, Optional<com.atlassian.plugin.webresource.prebake.PrebakeConfig> prebakeConfig)
public boolean supportsCdn()
supportsCdn
in interface com.atlassian.plugin.webresource.cdn.CDNStrategy
public String transformRelativeUrl(String relativeUrl)
transformRelativeUrl
in interface com.atlassian.plugin.webresource.cdn.CDNStrategy
public Optional<com.atlassian.plugin.webresource.prebake.PrebakeConfig> getPrebakeConfig()
getPrebakeConfig
in interface com.atlassian.plugin.webresource.cdn.CDNStrategy
Copyright © 2002-2018 Atlassian. All Rights Reserved.