Don't rewrite network path references in CSS URLs.

Fixes regression caused in 1.3.4.1 which caused network path reference URLs (i.e. //img.domain.com/path/font.eot) used in CSS `url()`'s' to be stripped of their leading slashes causing them to become relative URL paths.

Closes meteor/meteor#7416
This commit is contained in:
Jesse Rosenberger
2016-07-16 13:46:29 +03:00
parent ccd7dc40c8
commit fddaedeb08

View File

@@ -136,8 +136,9 @@ var rewriteRules = function (rules, mergedCssPath) {
// We don't rewrite URLs starting with a protocol definition such as
// http, https, or data.
if (resource.protocol !== null) {
// http, https, or data, or those with network-path references
// i.e. //img.domain.com/cat.gif
if (resource.protocol !== null || resource.href.startsWith('//')) {
continue;
}