annotate config/environments/production.rb @ 88:0f206bd4924f

Allows posting gzipped text.
author Edho Arief <edho@myconan.net>
date Tue, 06 Nov 2012 11:14:32 +0700
parents 4aa8194a1733
children cb30b72e8ded
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
1 Zeropaste::Application.configure do
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
2 # Settings specified here will take precedence over those in config/application.rb
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
3
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
4 # Code is not reloaded between requests
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
5 config.cache_classes = true
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
6
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
7 # Full error reports are disabled and caching is turned on
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
8 config.consider_all_requests_local = false
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
9 config.action_controller.perform_caching = true
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
10
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
11 # Disable Rails's static asset server (Apache or nginx will already do this)
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
12 config.serve_static_assets = false
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
13
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
14 # Compress JavaScripts and CSS
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
15 config.assets.compress = true
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
16
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
17 # Don't fallback to assets pipeline if a precompiled asset is missed
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
18 config.assets.compile = false
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
19
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
20 # Generate digests for assets URLs
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
21 config.assets.digest = true
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
22
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
23 # Defaults to nil and saved in location specified by config.assets.prefix
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
24 # config.assets.manifest = YOUR_PATH
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
25
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
26 # Specifies the header that your server uses for sending files
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
27 # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
28 # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
29
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
30 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
31 # config.force_ssl = true
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
32
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
33 # See everything in the log (default is :info)
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
34 # config.log_level = :debug
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
35
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
36 # Prepend all log lines with the following tags
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
37 # config.log_tags = [ :subdomain, :uuid ]
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
38
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
39 # Use a different logger for distributed setups
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
40 # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
41
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
42 # Use a different cache store in production
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
43 # config.cache_store = :mem_cache_store
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
44
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
45 # Enable serving of images, stylesheets, and JavaScripts from an asset server
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
46 # config.action_controller.asset_host = "http://assets.example.com"
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
47
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
48 # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
49 # config.assets.precompile += %w( search.js )
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
50
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
51 # Disable delivery errors, bad email addresses will be ignored
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
52 # config.action_mailer.raise_delivery_errors = false
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
53
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
54 # Enable threaded mode
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
55 # config.threadsafe!
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
56
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
57 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
58 # the I18n.default_locale when a translation can not be found)
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
59 config.i18n.fallbacks = true
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
60
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
61 # Send deprecation notices to registered listeners
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
62 config.active_support.deprecation = :notify
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
63
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
64 # Log the query plan for queries taking more than this (works
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
65 # with SQLite, MySQL, and PostgreSQL)
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
66 # config.active_record.auto_explain_threshold_in_seconds = 0.5
4aa8194a1733 Initial.
Edho Arief <edho@myconan.net>
parents:
diff changeset
67 end