about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/initializers/blacklists.rb5
-rw-r--r--config/initializers/ostatus.rb4
-rw-r--r--config/initializers/paperclip.rb18
-rw-r--r--config/locales/en.yml2
-rw-r--r--config/routes.rb2
5 files changed, 24 insertions, 7 deletions
diff --git a/config/initializers/blacklists.rb b/config/initializers/blacklists.rb
new file mode 100644
index 000000000..52646e64d
--- /dev/null
+++ b/config/initializers/blacklists.rb
@@ -0,0 +1,5 @@
+# frozen_string_literal: true
+
+Rails.application.configure do
+  config.x.email_domains_blacklist = ENV.fetch('EMAIL_DOMAIN_BLACKLIST') { 'mvrht.com' }
+end
diff --git a/config/initializers/ostatus.rb b/config/initializers/ostatus.rb
index 4ba432b6a..c5723b2e9 100644
--- a/config/initializers/ostatus.rb
+++ b/config/initializers/ostatus.rb
@@ -1,7 +1,9 @@
+# frozen_string_literal: true
+
 port  = ENV.fetch('PORT') { 3000 }
 host  = ENV.fetch('LOCAL_DOMAIN') { "localhost:#{port}" }
 https = ENV['LOCAL_HTTPS'] == 'true'
-  
+
 Rails.application.configure do
   config.x.local_domain = host
   config.x.hub_url      = ENV.fetch('HUB_URL') { 'https://pubsubhubbub.superfeedr.com' }
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb
index 80effc05e..93822a2d1 100644
--- a/config/initializers/paperclip.rb
+++ b/config/initializers/paperclip.rb
@@ -1,11 +1,19 @@
+# frozen_string_literal: true
+
 if ENV['S3_ENABLED'] == 'true'
   Aws.eager_autoload!(services: %w(S3))
 
-  Paperclip::Attachment.default_options[:storage]      = :s3
-  Paperclip::Attachment.default_options[:s3_protocol]  = 'https'
-  Paperclip::Attachment.default_options[:url]          = ':s3_domain_url'
-  Paperclip::Attachment.default_options[:s3_host_name] = "s3-#{ENV.fetch('S3_REGION')}.amazonaws.com"
-  Paperclip::Attachment.default_options[:path]         = '/:class/:attachment/:id_partition/:style/:filename'
+  Paperclip::Attachment.default_options[:storage]        = :s3
+  Paperclip::Attachment.default_options[:s3_protocol]    = 'https'
+  Paperclip::Attachment.default_options[:url]            = ':s3_domain_url'
+  Paperclip::Attachment.default_options[:s3_host_name]   = "s3-#{ENV.fetch('S3_REGION')}.amazonaws.com"
+  Paperclip::Attachment.default_options[:path]           = '/:class/:attachment/:id_partition/:style/:filename'
+  Paperclip::Attachment.default_options[:s3_headers]     = { 'Cache-Control' => 'max-age=315576000', 'Expires' => 10.years.from_now.httpdate }
+
+  unless ENV['S3_CLOUDFRONT_HOST'].blank?
+    Paperclip::Attachment.default_options[:url]           = ':s3_alias_url'
+    Paperclip::Attachment.default_options[:s3_host_alias] = ENV['S3_CLOUDFRONT_HOST']
+  end
 
   Paperclip::Attachment.default_options[:s3_credentials] = {
     bucket: ENV.fetch('S3_BUCKET'),
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 426f3928a..50a1f0e95 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -55,5 +55,7 @@ en:
   stream_entries:
     favourited: favourited a post by
     is_now_following: is now following
+  users:
+    invalid_email: The e-mail address is invalid
   will_paginate:
     page_gap: "…"
diff --git a/config/routes.rb b/config/routes.rb
index 35e5c269a..ac53bbed6 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -46,7 +46,7 @@ Rails.application.routes.draw do
 
   namespace :admin do
     resources :pubsubhubbub, only: [:index]
-    resources :accounts, only: [:index, :show]
+    resources :accounts, only: [:index, :show, :update]
   end
 
   namespace :api do