Merge remote-tracking branch 'parent/main' into upstream-20240118
This commit is contained in:
commit
2b51fabe9c
397 changed files with 2899 additions and 3252 deletions
|
@ -52,9 +52,9 @@ Rails.application.config.content_security_policy do |p|
|
|||
|
||||
if Rails.env.development?
|
||||
webpacker_public_host = ENV.fetch('WEBPACKER_DEV_SERVER_PUBLIC', Webpacker.config.dev_server[:public])
|
||||
webpacker_urls = %w(ws http).map { |protocol| "#{protocol}#{Webpacker.dev_server.https? ? 's' : ''}://#{webpacker_public_host}" }
|
||||
front_end_build_urls = %w(ws http).map { |protocol| "#{protocol}#{Webpacker.dev_server.https? ? 's' : ''}://#{webpacker_public_host}" }
|
||||
|
||||
p.connect_src :self, :data, :blob, *media_hosts, Rails.configuration.x.streaming_api_base_url, *webpacker_urls
|
||||
p.connect_src :self, :data, :blob, *media_hosts, Rails.configuration.x.streaming_api_base_url, *front_end_build_urls
|
||||
p.script_src :self, :unsafe_inline, :unsafe_eval, assets_host
|
||||
else
|
||||
p.connect_src :self, :data, :blob, *media_hosts, Rails.configuration.x.streaming_api_base_url
|
||||
|
|
|
@ -2,15 +2,6 @@
|
|||
|
||||
require 'devise/strategies/authenticatable'
|
||||
|
||||
# TODO: Remove this patch when this PR or similar is merged into Devise:
|
||||
# https://github.com/heartcombo/devise/pull/5645
|
||||
# We rely on ENV vars and not secrets/credentials, so the deprecation is just noise.
|
||||
class Devise::SecretKeyFinder
|
||||
def find
|
||||
@application.secret_key_base
|
||||
end
|
||||
end
|
||||
|
||||
Warden::Manager.after_set_user except: :fetch do |user, warden|
|
||||
session_id = warden.cookies.signed['_session_id'] || warden.raw_session['auth_id']
|
||||
session_id = user.activate_session(warden.request) unless user.session_activations.active?(session_id)
|
||||
|
@ -133,9 +124,11 @@ Devise.setup do |config|
|
|||
# The secret key used by Devise. Devise uses this key to generate
|
||||
# random tokens. Changing this key will render invalid all existing
|
||||
# confirmation, reset password and unlock tokens in the database.
|
||||
# Devise will use the `secret_key_base` on Rails 4+ applications as its `secret_key`
|
||||
# by default. You can change it below and use your own secret key.
|
||||
# config.secret_key = '2f86974c4dd7735170fd70fbf399f7a477ffd635ef240d07a22cf4bd7cd13dbae17c4383a2996d0c1e79a991ec18a91a17424c53e4771adb75a8b21904bd1403'
|
||||
#
|
||||
# Set explicitly to Rails default to avoid deprecation warnings.
|
||||
# https://github.com/heartcombo/devise/pull/5645#issuecomment-1871849856
|
||||
# Remove when Devise changes `SecretKeyFinder` to not emit deprecations.
|
||||
config.secret_key = Rails.application.secret_key_base
|
||||
|
||||
# ==> Mailer Configuration
|
||||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
||||
|
|
|
@ -5,4 +5,5 @@ require_relative '../../lib/premailer_webpack_strategy'
|
|||
Premailer::Rails.config.merge!(remove_ids: true,
|
||||
adapter: :nokogiri,
|
||||
generate_text_part: false,
|
||||
css_to_attributes: false,
|
||||
strategies: [PremailerWebpackStrategy])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue