Skip to content

Commit a70a6d9

Browse files
committed
capture possible cdn host
in production environments the url_prefix may be proceeded by a cdn host, ensure that it is part of the capture group this change will require anything prior to the url_prefix to end in a forward slash
1 parent cc19b37 commit a70a6d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/propshaft/compiler/source_mapping_urls.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def compile(logical_path, input)
1111

1212
private
1313
def asset_path(source_mapping_url, logical_path)
14-
source_mapping_url.gsub!(/^\/?#{url_prefix}\//, "")
14+
source_mapping_url.gsub!(/^(.+\/)?#{url_prefix}\//, "")
1515

1616
if logical_path.dirname.to_s == "."
1717
source_mapping_url

0 commit comments

Comments
 (0)