]>
cat aescling's git repositories - mastodon.git/blob - config/application.rb
1 require_relative
'boot'
5 # Require the gems listed in Gemfile, including any gems
6 # you've limited to :test, :development, or :production.
7 Bundler
.require(*Rails
.groups
)
9 require_relative
'../app/lib/exceptions'
10 require_relative
'../lib/paperclip/lazy_thumbnail'
11 require_relative
'../lib/paperclip/gif_transcoder'
12 require_relative
'../lib/paperclip/video_transcoder'
13 require_relative
'../lib/mastodon/snowflake'
14 require_relative
'../lib/mastodon/version'
15 require_relative
'../lib/devise/ldap_authenticatable'
19 require_relative
'../lib/mastodon/redis_config'
22 class Application
< Rails
::Application
23 # Initialize configuration defaults for originally generated Rails version.
24 config
.load_defaults
5.1
26 # Settings in config/environments/* take precedence over those specified here.
27 # Application configuration should go into files in config/initializers
28 # -- all .rb files in that directory are automatically loaded.
30 # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
31 # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
32 # config.time_zone = 'Central Time (US & Canada)'
34 # All translations from config/locales/*.rb,yml are auto loaded.
35 # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
36 config
.i18n
.available_locales
= [
76 config
.i18n
.default_locale
= ENV['DEFAULT_LOCALE']&.to_sym
77 if config
.i18n
.available_locales
.include?(config
.i18n
.default_locale
)
78 config
.i18n
.fallbacks
= [:en]
80 config
.i18n
.default_locale
= :en
83 # config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb')
84 # config.autoload_paths += Dir[Rails.root.join('app', 'api', '*')]
86 config
.active_job
.queue_adapter
= :sidekiq
88 config
.middleware
.insert_before
0, Rack
::Cors do
91 resource
'/@:username', headers
: :any, methods
: [:get], credentials
: false
92 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']
93 resource
'/oauth/token', headers
: :any, methods
: [:post], credentials
: false
97 config
.middleware
.use Rack
::Attack
98 config
.middleware
.use Rack
::Deflater
101 Doorkeeper
::AuthorizationsController.layout
'modal'
102 Doorkeeper
::AuthorizedApplicationsController.layout
'admin'
103 Doorkeeper
::Application.send
:include, ApplicationExtension
This page took 0.097224 seconds and 4 git commands to generate.