Sha256: 2c6f868dad8060f8bb8091032c73bf6098d8952d7e4d3ac0b6457ad55bf61882
Contents?: true
Size: 648 Bytes
Versions: 3
Compression:
Stored size: 648 Bytes
Contents
= AddHttpHeader This gem provides Rack middleware which adds an http header to the response. You can either add a hard coded header, or provide a block that will get evaluated at runtime. == Example # Add the host and build version to the header to make debugging production issues easier host_info = "#{`hostname`.split('.').first}; #{BUILD_VERSION}" Rails.configuration.middleware.insert_before(0, AddHttpHeader, 'X-Host-Info' => host_info) # Add debug info about the request only on errors Rails.configuration.middleware.insert_before(0, AddHttpHeader, 'X-Debug' => lambda{|env, status, headers| DebugInfo(env) if status >= 500})
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
add_http_header-1.0.4 | README.rdoc |
add_http_header-1.0.3 | README.rdoc |
add_http_header-1.0.2 | README.rdoc |