def filestore_pregenerator(request, elements, kw):
    """Pregenerator for the filestore, which may run under a different domain
    name in the case of a CDN cacher thinger.
    """
    cdn_root = request.registry.settings.get('cdn_root')
    if cdn_root:
        kw['_app_url'] = cdn_root

    return elements, kw