Please note: {@code SimpleCDN} will not rewrite resource reference URLs thatinclude query string parameters. Our reasoning is that parameterized URLs usually indicate that the resource is dynamic, and therefore not appropriate for serving via CDN. Furthermore it should be noted that Amazon CloudFront will refuse to proxy URLs that contain query string parameters (it strips the parameters off).
When configuring the CDN host, the easiest setup is a reverse-proxy. For example, with Amazon CloudFront, you would specify your Wicket app as the custom origin, and specify the CloudFront host when constructing this SimpleCDN. It's that easy.
public class MyApplication extends WebApplication { @Override protected void init() { super.init(); // Enable CDN when in deployment mode if(usesDeploymentConfig()) { new SimpleCDN("http://age39p8hg23.cloudfront.net").install(this); } } }For those familiar with Ruby on Rails, {@code SimpleCDN} is inspired by the Rails{@code action_controller.asset_host} configuration setting. @since 3.2
|
|