0
0
Fork 0

Upgrade Rails to version 5.2.0 (#5898)

This commit is contained in:
Yamagishi Kazutoshi 2018-04-12 21:45:17 +09:00 committed by Eugen Rochko
parent 8e88a18316
commit 50529cbceb
22 changed files with 330 additions and 262 deletions

View file

@ -23,7 +23,7 @@ require_relative '../lib/mastodon/redis_config'
module Mastodon
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 5.1
config.load_defaults 5.2
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
@ -85,15 +85,6 @@ module Mastodon
config.active_job.queue_adapter = :sidekiq
config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
resource '/@:username', headers: :any, methods: [:get], credentials: false
resource '/api/*', headers: :any, methods: [:post, :put, :delete, :get, :patch, :options], credentials: false, expose: ['Link', 'X-RateLimit-Reset', 'X-RateLimit-Limit', 'X-RateLimit-Remaining', 'X-Request-Id']
resource '/oauth/token', headers: :any, methods: [:post], credentials: false
end
end
config.middleware.use Rack::Attack
config.middleware.use Rack::Deflater