Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add support for 'Access-Control-Allow-Origin' custom header to fix FF…

… Cross-Site web fonts and other objects
  • Loading branch information...
commit 3e495382139d2b64bd6262d21f90270016b35caf 1 parent d3fdc44
@simonoff simonoff authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/s3/object.rb
View
3  lib/s3/object.rb
@@ -5,7 +5,7 @@ class Object
include Parser
extend Forwardable
- attr_accessor :content_type, :content_disposition, :content_encoding, :cache_control
+ attr_accessor :content_type, :content_disposition, :content_encoding, :cache_control, :access_control_allow_origin
attr_reader :last_modified, :etag, :size, :bucket, :key, :acl, :storage_class
attr_writer :content
@@ -230,6 +230,7 @@ def dump_headers
headers[:content_encoding] = @content_encoding if @content_encoding
headers[:content_disposition] = @content_disposition if @content_disposition
headers[:cache_control] = @cache_control if @cache_control
+ headers[:access_control_allow_origin] = @access_control_allow_origin if @access_control_allow_origin
headers
end
Please sign in to comment.
Something went wrong with that request. Please try again.