Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Incomplete
-
5.3.4
-
None
Description
(related thread: http://tapestry.1045711.n5.nabble.com/Why-is-AssetPathConverter-not-called-for-javascript-stacks-td5716629.html)
We use assetpathconverter in order to get assets from CDN(cloudfront).
However it looks like it's not working for stack assets (but it is for other assets).
Module:
binder.bind(AssetPathConverter.class, CDNAssetPathConverter.class).withId("CDNAssetPathConverter");
public static void contributeServiceOverride(MappedConfiguration<Class,Object> configuration,
@Local AssetPathConverter assetPathConverter) {
configuration.add(AssetPathConverter.class, assetPathConverter);
}
CDNAssetPathConverter:
public class CDNAssetPathConverter implements AssetPathConverter {
private IParameter ip;
private String applicationVersion;
public CDNAssetPathConverter(@Inject @Symbol(SymbolConstants.APPLICATION_VERSION) String applicationVersion,
@Inject IParameter ip)
String getCDNDomain()
@Override
public String convertAssetPath(String assetPath)
private String convertToCDN(String path, String domain)
{ String _path = path.replaceFirst("^/+", ""); return String.format("http://%s/%s", domain, _path); } @Override
public boolean isInvariant()
}
Howard thought it might be an oversight