VRFS-719 Added code to force downloads through cloudfront
This commit is contained in:
parent
6b4e42dfc5
commit
fa8df410da
|
|
@ -51,11 +51,12 @@ class ArtifactsController < ApiController
|
|||
end
|
||||
|
||||
def determine_url(artifact)
|
||||
|
||||
if SampleApp::Application.config.storage_type == :file
|
||||
# this is basically a dev-time only path of code; we store real artifacts in s3
|
||||
url = SampleApp::Application.config.jam_admin_root_url + artifact.uri.url
|
||||
else
|
||||
url = artifact.uri.url
|
||||
url = artifact.uri.url.gsub(SampleApp::Application.config.aws_fullhost,SampleApp::Application.config.cloudfront_host)
|
||||
end
|
||||
|
||||
return url
|
||||
|
|
|
|||
|
|
@ -122,6 +122,10 @@ if defined?(Bundler)
|
|||
config.aws_bucket = 'jamkazam-dev'
|
||||
config.aws_bucket_public = 'jamkazam-dev-public'
|
||||
config.aws_cache = '315576000'
|
||||
config.aws_fullhost = "#{config.aws_bucket_public}.s3.amazonaws.com"
|
||||
|
||||
# cloudfront host
|
||||
config.cloudfront_host = "d34f55ppvvtgi3.cloudfront.net"
|
||||
|
||||
# facebook keys
|
||||
config.facebook_key = '468555793186398'
|
||||
|
|
|
|||
Loading…
Reference in New Issue