Class CSSURLRewriter

  • All Implemented Interfaces:
    StreamableResourceSource

    public class CSSURLRewriter
    extends DelegatingSRS
    Rewrites the url() attributes inside a CSS (MIME type "text/css")) resource. Each url is expanded to a complete path; this allows for CSS aggregation, where the location of the CSS file will change (which would ordinarily break relative URLs), and for changing the relative directories of the CSS file and the image assets it may refer to (useful for incorporating a hash of the resource's content into the exposed URL). One potential problem with URL rewriting is the way that URLs for referenced resources are generated; we are somewhat banking on the fact that referenced resources are non-compressable images.
    Since:
    5.4
    See Also:
    SymbolConstants.STRICT_CSS_URL_REWRITING