From 71f335c2fcac974af4672cb521751ba6cdee06a6 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 13 Apr 2021 23:43:41 +0200 Subject: Add HTTP header to explicitly opt out of FLoC by default (#16036) Fixes #16034 --- config/environments/production.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'config/environments/production.rb') diff --git a/config/environments/production.rb b/config/environments/production.rb index 6df0a3365..22be14749 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -116,6 +116,7 @@ Rails.application.configure do 'X-Frame-Options' => 'DENY', 'X-Content-Type-Options' => 'nosniff', 'X-XSS-Protection' => '1; mode=block', + 'Permissions-Policy' => 'interest-cohort=()', } config.x.otp_secret = ENV.fetch('OTP_SECRET') -- cgit From 1efcbb9cfe36d4428ef6af988bb0d7b25ace3971 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 19 Apr 2021 18:41:29 +0200 Subject: Add Message-ID header to outgoing emails (#16076) * Add Message-ID header to outgoing emails * Use email domain name from SMTP_FROM_ADDRESS, fallback on WEB_DOMAIN on failure * Use notifications@localhost as fallback for SMTP_FROM_ADDRESS, do not catch parse errors --- config/environments/production.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'config/environments/production.rb') diff --git a/config/environments/production.rb b/config/environments/production.rb index 22be14749..df6b07d77 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -90,9 +90,12 @@ Rails.application.configure do config.action_mailer.perform_caching = false # E-mails + outgoing_email_address = ENV.fetch('SMTP_FROM_ADDRESS', 'notifications@localhost') + outgoing_mail_domain = Mail::Address.new(outgoing_email_address).domain config.action_mailer.default_options = { - from: ENV.fetch('SMTP_FROM_ADDRESS', 'notifications@localhost'), - reply_to: ENV['SMTP_REPLY_TO'] + from: outgoing_email_address, + reply_to: ENV['SMTP_REPLY_TO'], + 'Message-ID': -> { "<#{Mail.random_tag}@#{outgoing_mail_domain}>" }, } config.action_mailer.smtp_settings = { -- cgit