mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-18 07:38:42 +00:00
Fix autoloading deprecation warnings from Rails 6 (#16010)
This commit is contained in:
parent
ed7d459d7f
commit
3f2533ca8e
|
@ -51,6 +51,7 @@ Rails.application.config.content_security_policy_nonce_generator = -> request {
|
||||||
|
|
||||||
Rails.application.config.content_security_policy_nonce_directives = %w(style-src)
|
Rails.application.config.content_security_policy_nonce_directives = %w(style-src)
|
||||||
|
|
||||||
|
Rails.application.reloader.to_prepare do
|
||||||
PgHero::HomeController.content_security_policy do |p|
|
PgHero::HomeController.content_security_policy do |p|
|
||||||
p.script_src :self, :unsafe_inline, assets_host
|
p.script_src :self, :unsafe_inline, assets_host
|
||||||
p.style_src :self, :unsafe_inline, assets_host
|
p.style_src :self, :unsafe_inline, assets_host
|
||||||
|
@ -59,3 +60,4 @@ end
|
||||||
PgHero::HomeController.after_action do
|
PgHero::HomeController.after_action do
|
||||||
request.content_security_policy_nonce_generator = nil
|
request.content_security_policy_nonce_generator = nil
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -112,7 +112,9 @@ else
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Rails.application.reloader.to_prepare do
|
||||||
Paperclip.options[:content_type_mappings] = { csv: Import::FILE_TYPES }
|
Paperclip.options[:content_type_mappings] = { csv: Import::FILE_TYPES }
|
||||||
|
end
|
||||||
|
|
||||||
# In some places in the code, we rescue this exception, but we don't always
|
# In some places in the code, we rescue this exception, but we don't always
|
||||||
# load the S3 library, so it may be an undefined constant:
|
# load the S3 library, so it may be an undefined constant:
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
Rails.application.reloader.to_prepare do
|
||||||
ActionController::Base.log_warning_on_csrf_failure = false
|
ActionController::Base.log_warning_on_csrf_failure = false
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in a new issue