allow customizing the clacks overhead

This commit is contained in:
Kay Faraday 2021-08-06 08:57:16 +00:00
parent 3deefb98b6
commit 6d1e2824de
2 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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