diff options
author | ThibG <thib@sitedethib.com> | 2020-04-02 22:17:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 22:17:29 +0200 |
commit | 5c5317041f17375666bfaf4788f0adf71804b47d (patch) | |
tree | 4dfa61cff64d1f2477bcbf914e16b25fd2953386 /config/initializers | |
parent | a192b193bdf7013df09c6cd63916274cd9d47cf7 (diff) | |
parent | b367dd713e5b97d79d52e9cb67042eadb241d032 (diff) |
Merge pull request #1310 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/content_security_policy.rb | 1 | ||||
-rw-r--r-- | config/initializers/rack_attack.rb | 1 | ||||
-rw-r--r-- | config/initializers/sidekiq.rb | 5 |
3 files changed, 7 insertions, 0 deletions
diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index 269a7d1c9..d1e6701e2 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -37,6 +37,7 @@ if Rails.env.production? p.style_src :self, :unsafe_inline, assets_host p.media_src :self, :data, *data_hosts p.frame_src :self, :https + p.child_src :self, :blob, assets_host p.worker_src :self, :blob, assets_host p.connect_src :self, :blob, :data, Rails.configuration.x.streaming_api_base_url, *data_hosts p.manifest_src :self, assets_host diff --git a/config/initializers/rack_attack.rb b/config/initializers/rack_attack.rb index 8bc1104d4..09458c540 100644 --- a/config/initializers/rack_attack.rb +++ b/config/initializers/rack_attack.rb @@ -42,6 +42,7 @@ class Rack::Attack /auth/sign_in /auth /auth/password + /auth/confirmation ).freeze PROTECTED_PATHS_REGEX = Regexp.union(PROTECTED_PATHS.map { |path| /\A#{Regexp.escape(path)}/ }) diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 288453a04..f2733562f 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -13,6 +13,11 @@ Sidekiq.configure_server do |config| config.server_middleware do |chain| chain.add SidekiqErrorHandler end + + config.death_handlers << lambda do |job, _ex| + digest = job['lock_digest'] + SidekiqUniqueJobs::Digests.delete_by_digest(digest) if digest + end end Sidekiq.configure_client do |config| |