about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-12-21 01:30:35 +0000
committerEric Wong <normalperson@yhbt.net>2010-12-21 01:30:35 +0000
commitee29a14cb383839cf5dcef6fe442558f46a1615b (patch)
tree1d533dba151479f963375d11d14da3ef0e85a197
parent1f5bac15cd8e4393c6da98eb7bb4532133dc6259 (diff)
downloadunicorn-ee29a14cb383839cf5dcef6fe442558f46a1615b.tar.gz
This is the most important part of Unicorn documentation
for end users.
-rw-r--r--lib/unicorn/configurator.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb
index 2415dda..6e16502 100644
--- a/lib/unicorn/configurator.rb
+++ b/lib/unicorn/configurator.rb
@@ -10,9 +10,10 @@ require 'logger'
 # http://unicorn.bogomips.org/examples/nginx.conf
 class Unicorn::Configurator
   include Unicorn
-  attr_accessor :set, :config_file, :after_reload
 
   # :stopdoc:
+  attr_accessor :set, :config_file, :after_reload
+
   # used to stash stuff for deferred processing of cli options in
   # config.ru after "working_directory" is bound.  Do not rely on
   # this being around later on...
@@ -452,7 +453,8 @@ class Unicorn::Configurator
   # Sets whether or not the parser will trust X-Forwarded-Proto and
   # X-Forwarded-SSL headers and set "rack.url_scheme" to "https" accordingly.
   # Rainbows!/Zbatery installations facing untrusted clients directly
-  # should set this to +false+.  This is +true+ by default.
+  # should set this to +false+.  This is +true+ by default as Unicorn
+  # is designed to only sit behind trusted nginx proxies.
   def trust_x_forwarded(bool)
     set_bool(:trust_x_forwarded, bool)
   end
@@ -481,7 +483,7 @@ class Unicorn::Configurator
   end
 
 private
-  def set_int(var, n, min)
+  def set_int(var, n, min) #:nodoc:
     Integer === n or raise ArgumentError, "not an integer: #{var}=#{n.inspect}"
     n >= min or raise ArgumentError, "too low (< #{min}): #{var}=#{n.inspect}"
     set[var] = n