Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
CssLinkResourceTransformer throws Exception on links that start with // [SPR-12632] #17233
We have background images in our CSS that are served off the CDN. Instead of prefixing with http:// or https://, we start them with //.
CssLinkResourceTransformer will throw an IllegalStateException state exception when it encounters one of these. I see there is a hasScheme method, but it seems to only be looking for http or https.
Christopher Savory commented
Brian, It would be nice if there was an ExternalResourceTansformer for resources that are served off of a CDN. Either a CDN that was a reverse proxy to a site or perhaps was backed with something else like Amazon's S3. In the case of the later, we would have to know the destination of the CDN as well as the source system that owned the resource.