Skip to content

Commit

Permalink
fix: Add Accept header to requests in NetworkLoader
Browse files Browse the repository at this point in the history
This allows development servers to serve the correct file type.

For more information see ElMassimo/vite_ruby#93 (comment)
  • Loading branch information
ElMassimo authored Jun 22, 2021
1 parent 2870060 commit 97bd1d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/premailer/rails/css_loaders/network_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module NetworkLoader

def load(url)
uri = uri_for_url(url)
Net::HTTP.get(uri) if uri
Net::HTTP.get(uri, { 'Accept' => 'text/css' }) if uri
end

def uri_for_url(url)
Expand Down

0 comments on commit 97bd1d9

Please sign in to comment.