Skip to content

Commit

Permalink
capture possible cdn host
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tagCincy committed Dec 12, 2023
1 parent cc19b37 commit a70a6d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/propshaft/compiler/source_mapping_urls.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def compile(logical_path, input)

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

if logical_path.dirname.to_s == "."
source_mapping_url
Expand Down

0 comments on commit a70a6d9

Please sign in to comment.