Fix autoloading deprecation warnings from Rails 6 (#16010)
parent
6890846e47
commit
1189a308c9
|
@ -51,11 +51,13 @@ 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)
|
||||||
|
|
||||||
PgHero::HomeController.content_security_policy do |p|
|
Rails.application.reloader.to_prepare do
|
||||||
p.script_src :self, :unsafe_inline, assets_host
|
PgHero::HomeController.content_security_policy do |p|
|
||||||
p.style_src :self, :unsafe_inline, assets_host
|
p.script_src :self, :unsafe_inline, assets_host
|
||||||
end
|
p.style_src :self, :unsafe_inline, assets_host
|
||||||
|
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
|
||||||
|
|
||||||
Paperclip.options[:content_type_mappings] = { csv: Import::FILE_TYPES }
|
Rails.application.reloader.to_prepare do
|
||||||
|
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
|
||||||
|
|
||||||
ActionController::Base.log_warning_on_csrf_failure = false
|
Rails.application.reloader.to_prepare do
|
||||||
|
ActionController::Base.log_warning_on_csrf_failure = false
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue