mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Switch to s3_alias_url that enabble virtual host type of path
This commit is contained in:
@@ -62,10 +62,9 @@ module Spree
|
||||
ActiveSupport::JSON.decode(Spree::Config[:s3_headers]))
|
||||
set_attachment_attributes(:bucket, Spree::Config[:s3_bucket])
|
||||
|
||||
# When using S3, we set the URL on property s3_host_name
|
||||
set_attachment_attributes(:s3_host_name, attachment_definitions[:attachment][:url])
|
||||
set_attachment_attributes(:url, ":s3_domain_url")
|
||||
# :s3_alias_url
|
||||
# We use :s3_alias_url (virtual host url style) and set the URL on property s3_host_alias
|
||||
set_attachment_attributes(:s3_host_alias, attachment_definitions[:attachment][:url])
|
||||
set_attachment_attributes(:url, ":s3_alias_url")
|
||||
else
|
||||
attachment_definitions[:attachment].delete :storage
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user