mirror of https://github.com/mastodon/mastodon
Merge branch 'master' into french-translation
commit
60577f4c6e
@ -0,0 +1,16 @@
|
||||
module ObfuscateFilename
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
class_methods do
|
||||
def obfuscate_filename(*args)
|
||||
before_action { obfuscate_filename(*args) }
|
||||
end
|
||||
end
|
||||
|
||||
def obfuscate_filename(path)
|
||||
file = params.dig(*path)
|
||||
return if file.nil?
|
||||
|
||||
file.original_filename = "media" + File.extname(file.original_filename)
|
||||
end
|
||||
end
|
@ -1,5 +1,8 @@
|
||||
- content_for :header_tags do
|
||||
%link{ rel: 'alternate', type: 'application/atom+xml', href: account_stream_entry_url(@account, @stream_entry, format: 'atom') }/
|
||||
%meta{ name: 'og:site_name', content: 'Mastodon' }/
|
||||
%meta{ name: 'og:type', content: 'article' }/
|
||||
%meta{ name: 'og:article:author', content: @account.username }/
|
||||
|
||||
.activity-stream.activity-stream-headless
|
||||
= render partial: @type, locals: { @type.to_sym => @stream_entry.activity, include_threads: true }
|
||||
|
@ -1,17 +0,0 @@
|
||||
require 'rack-mini-profiler'
|
||||
|
||||
Rack::MiniProfilerRails.initialize!(Rails.application)
|
||||
|
||||
Rails.application.middleware.swap(Rack::Deflater, Rack::MiniProfiler)
|
||||
Rails.application.middleware.swap(Rack::MiniProfiler, Rack::Deflater)
|
||||
|
||||
Rack::MiniProfiler.config.storage = Rack::MiniProfiler::MemoryStore
|
||||
|
||||
if Rails.env.production?
|
||||
Rack::MiniProfiler.config.storage_options = {
|
||||
host: ENV.fetch('REDIS_HOST') { 'localhost' },
|
||||
port: ENV.fetch('REDIS_PORT') { 6379 },
|
||||
}
|
||||
|
||||
Rack::MiniProfiler.config.storage = Rack::MiniProfiler::RedisStore
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
class AddSensitiveToStatuses < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
add_column :statuses, :sensitive, :boolean, default: false
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue