Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/javascript/styles/mastodon/modal.scss`: For some reason we changed the file loading path in glitch-soc, but now upstream has completely changed how the logo is loaded. Applied upstream changes.
This commit is contained in:
15
lib/action_dispatch/cookie_jar_extensions.rb
Normal file
15
lib/action_dispatch/cookie_jar_extensions.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module ActionDispatch
|
||||
module CookieJarExtensions
|
||||
private
|
||||
|
||||
# Monkey-patch ActionDispatch to serve secure cookies to Tor Hidden Service
|
||||
# users. Otherwise, ActionDispatch would drop the cookie over HTTP.
|
||||
def write_cookie?(*)
|
||||
request.headers['Host'].ends_with?('.onion') || super
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ActionDispatch::Cookies::CookieJar.prepend(ActionDispatch::CookieJarExtensions)
|
||||
11
lib/rails/engine_extensions.rb
Normal file
11
lib/rails/engine_extensions.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
module Rails
|
||||
module EngineExtensions
|
||||
# Rewrite task loading code to filter digitalocean.rake task
|
||||
def run_tasks_blocks(app)
|
||||
Railtie.instance_method(:run_tasks_blocks).bind(self).call(app)
|
||||
paths["lib/tasks"].existent.reject { |ext| ext.end_with?('digitalocean.rake') }.sort.each { |ext| load(ext) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Rails::Engine.prepend(Rails::EngineExtensions)
|
||||
Reference in New Issue
Block a user