Merge remote-tracking branch 'parent/main' into upstream-20240926

This commit is contained in:
KMY 2024-09-26 08:29:41 +09:00
commit c905714459
517 changed files with 4284 additions and 3891 deletions

View file

@ -120,8 +120,7 @@ Doorkeeper.configure do
:'admin:write:domain_blocks',
:'admin:write:ip_blocks',
:'admin:write:email_domain_blocks',
:'admin:write:canonical_email_blocks',
:crypto
:'admin:write:canonical_email_blocks'
# Change the way client credentials are retrieved from the request object.
# By default it retrieves first from the `HTTP_AUTHORIZATION` header, then

View file

@ -19,7 +19,6 @@ ActiveSupport::Inflector.inflections(:en) do |inflect|
inflect.acronym 'CLI'
inflect.acronym 'DeepL'
inflect.acronym 'DSL'
inflect.acronym 'Ed25519'
inflect.acronym 'JsonLd'
inflect.acronym 'OEmbed'
inflect.acronym 'OStatus'

View file

@ -56,12 +56,13 @@ if ENV.keys.any? { |name| name.match?(/OTEL_.*_ENDPOINT/) }
},
})
prefix = ENV.fetch('OTEL_SERVICE_NAME_PREFIX', 'mastodon')
prefix = ENV.fetch('OTEL_SERVICE_NAME_PREFIX', 'mastodon')
separator = ENV.fetch('OTEL_SERVICE_NAME_SEPARATOR', '/')
c.service_name = case $PROGRAM_NAME
when /puma/ then "#{prefix}/web"
when /puma/ then "#{prefix}#{separator}web"
else
"#{prefix}/#{$PROGRAM_NAME.split('/').last}"
"#{prefix}#{separator}#{$PROGRAM_NAME.split('/').last}"
end
c.service_version = Mastodon::Version.to_s
end

View file

@ -1,4 +1,4 @@
# frozen_string_literal: true
# 0.5s is a fairly high timeout, but that should account for slow servers under load
Regexp.timeout = 0.5 if Regexp.respond_to?(:timeout=)
# 2s is a fairly high default, but that should account for slow servers under load
Regexp.timeout = ENV.fetch('REGEXP_TIMEOUT', 2).to_f if Regexp.respond_to?(:timeout=)