ember-cli / broccoli-asset-rev

Broccoli plugin to add fingerprint checksums and CDN URLs to your assets
MIT License
87 stars 84 forks source link

Fingerprints protocol relative URLs #106

Closed felixbuenemann closed 7 years ago

felixbuenemann commented 7 years ago

broccoli-asset-rev@2.4.6 wrongly fingerprints protocol relative URLs:

input:

<img src="//cdn.example.com/foo.png" />

output:

<img src="//cdn.example.com/foo-ff90e8722fb1fb8000e1b6533589ce90.png" />

expected:

<img src="//cdn.example.com/foo.png" />

I also tried to exclude the protocol relative urls using the following config, but it doesn't work, the urls are still fingerprinted:

// ember-cli-build.js
var app = new EmberApp({
  fingerprint: {
    exclude: ['//**']
  }
});
felixbuenemann commented 7 years ago

This also happens with non relative URLs. Is this expected behavior?

I found a similar report in rickharrison/broccoli-asset-rewrite#24.

felixbuenemann commented 7 years ago

Sorry, seems this report should've gone to broccoli-asset-rewrite. I was confused because the ember docs mention this plugin in the section on fingerprinting and the configuration is shared for both broccoli-asset-rev and broccoli-asset-rewrite.