then if request.script_name is empty string, File.join(request.script_name, file_path) will return /http://cdn-0.example.org/file_path, that's unexpected url.
//cdn-0.example.org has no this problem just because File.join('','//cdn-0.example.org') return //cdn-0.example.org.
https://github.com/rstacruz/sinatra-assetpack/blob/master/lib/sinatra/assetpack/helpers.rb#L21
if asset_hosts configured as below:
then if
request.script_name
is empty string,File.join(request.script_name, file_path)
will return/http://cdn-0.example.org/file_path
, that's unexpected url.//cdn-0.example.org
has no this problem just becauseFile.join('','//cdn-0.example.org')
return//cdn-0.example.org
.