2019-05-03 06:17:27 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2013-03-11 08:21:56 +08:00
|
|
|
Discourse::Application.configure do
|
|
|
|
# Settings specified here will take precedence over those in config/application.rb
|
|
|
|
|
2014-02-18 00:44:28 +08:00
|
|
|
config.eager_load = true
|
2013-09-10 14:22:58 +08:00
|
|
|
|
2013-03-11 08:21:56 +08:00
|
|
|
# Code is not reloaded between requests
|
|
|
|
config.cache_classes = true
|
|
|
|
|
2013-09-04 07:39:16 +08:00
|
|
|
config.log_level = :info
|
|
|
|
|
2013-03-11 08:21:56 +08:00
|
|
|
# Full error reports are disabled and caching is turned on
|
|
|
|
config.consider_all_requests_local = false
|
|
|
|
config.action_controller.perform_caching = true
|
|
|
|
|
|
|
|
# in profile mode we serve static assets
|
2017-10-28 00:32:23 +08:00
|
|
|
config.public_file_server.enabled = true
|
2013-03-11 08:21:56 +08:00
|
|
|
|
|
|
|
# Compress JavaScripts and CSS
|
|
|
|
config.assets.compress = true
|
|
|
|
|
|
|
|
# stuff should be pre-compiled, allow compilation to make life easier
|
2013-11-05 11:12:26 +08:00
|
|
|
config.assets.compile = true
|
2013-03-11 08:21:56 +08:00
|
|
|
|
|
|
|
# Generate digests for assets URLs
|
|
|
|
config.assets.digest = true
|
|
|
|
|
|
|
|
# Specifies the header that your server uses for sending files
|
|
|
|
config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for nginx
|
|
|
|
|
2021-10-05 18:18:06 +08:00
|
|
|
# we recommend you use mailhog https://github.com/mailhog/MailHog
|
2013-08-19 09:33:38 +08:00
|
|
|
config.action_mailer.smtp_settings = { address: "localhost", port: 1025 }
|
2013-03-11 08:21:56 +08:00
|
|
|
|
|
|
|
# Send deprecation notices to registered listeners
|
|
|
|
config.active_support.deprecation = :notify
|
|
|
|
|
2013-04-11 14:24:08 +08:00
|
|
|
# allows users to use mini profiler
|
2014-07-17 06:34:30 +08:00
|
|
|
config.load_mini_profiler = false
|
2013-03-11 08:21:56 +08:00
|
|
|
|
2014-11-11 07:28:17 +08:00
|
|
|
# we don't need full logster support, but need to keep it working
|
|
|
|
config.after_initialize { Logster.logger = Rails.logger }
|
|
|
|
|
2013-04-11 14:24:08 +08:00
|
|
|
# for profiling with perftools
|
|
|
|
# config.middleware.use ::Rack::PerftoolsProfiler, default_printer: 'gif'
|
2013-03-11 08:21:56 +08:00
|
|
|
end
|