Method: Jets::AssetTagHelper#favicon_path
- Defined in:
- lib/jets/overrides/rails/asset_tag_helper.rb
#favicon_path(path = 'favicon.ico') ⇒ Object
Serves favicon out of s3 when on API gateway.
Useful helper for API Gateway since serving binary data like images without an Accept header doesnt work well. You can changed Media Types to ‘/’ but then that messes up form data.
61 62 63 |
# File 'lib/jets/overrides/rails/asset_tag_helper.rb', line 61 def favicon_path(path='favicon.ico') on_aws? ? "#{s3_public}/#{path}" : "/#{path}" end |