diff --git a/.env.production.sample b/.env.production.sample index 65f3f9d1f..2c60040b6 100644 --- a/.env.production.sample +++ b/.env.production.sample @@ -276,3 +276,8 @@ MAX_POLL_OPTION_CHARS=100 # Units are in bytes MAX_EMOJI_SIZE=51200 MAX_REMOTE_EMOJI_SIZE=204800 + +# Customize the X-Clacks-Overhead header to honor someone's name or legacy. +# If unset, this defaults to "GNU Natalie Nguyen". If set to an empty string, +# the header is disabled. +# CLACKS_OVERHEAD=GNU Natalie Nguyen diff --git a/config/environments/production.rb b/config/environments/production.rb index bf6b5d88e..0241502a3 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -122,8 +122,11 @@ Rails.application.configure do 'Permissions-Policy' => 'interest-cohort=()', 'Referrer-Policy' => 'same-origin', 'Strict-Transport-Security' => 'max-age=63072000; includeSubDomains; preload', - 'X-Clacks-Overhead' => 'GNU Natalie Nguyen' } + if not (clacks_overhead = ENV.fetch('CLACKS_OVERHEAD', 'GNU Natalie Nguyen')).empty? + config.action_dispatch.default_headers['X-Clacks-Overhead'] = clacks_overhead + end + config.x.otp_secret = ENV.fetch('OTP_SECRET') end