Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 481 Bytes

README.md

File metadata and controls

21 lines (14 loc) · 481 Bytes

Rack::HeaderFilter

Remove specific HTTP headers from Rack response.

Example Rack Usage

In your config.ru:

# remove 'X-Request-Id', 'X-Runtime' and X-Rack-Cache headers
use Rack::HeaderFilter, ['X-Request-Id', 'X-Runtime', 'X-Rack-Cache']

Exapmle Rails Usage

In your application.rb:

# remove 'X-Request-Id', 'X-Runtime' and X-Rack-Cache headers
config.middleware.insert 0, 'Rack::HeaderFilter', ['X-Request-Id', 'X-Runtime', 'X-Rack-Cache']