Skip to content

Commit

Permalink
Merge pull request #261 from ElMassimo/mime
Browse files Browse the repository at this point in the history
Add Accept header to requests in NetworkLoader
  • Loading branch information
fphilipe committed Oct 16, 2022
2 parents 3137b11 + 97bd1d9 commit d221928
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## HEAD

- Lazily load actionmailer (@c960657, #260)
- HTTP request for CSS files now have an `Accept: text/css` header (@ElMassimo, #261)

## v1.11.1

Expand Down
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 d221928

Please sign in to comment.