Class: Goliath::Rack::SecureHeaders

Inherits:
Object
  • Object
show all
Includes:
AsyncMiddleware
Defined in:
lib/grass/goliath/rack/secure_headers.rb

Constant Summary collapse

HEADERS =
{
  'X-Frame-Options' => 'SAMEORIGIN',
  'X-XSS-Protection' => '1; mode=block',
  'X-Content-Type-Options' => 'nosniff'
}

Instance Method Summary collapse

Instance Method Details

#post_process(env, status, headers, body) ⇒ Object



13
14
15
16
# File 'lib/grass/goliath/rack/secure_headers.rb', line 13

def post_process(env, status, headers, body)
  headers.update HEADERS
  [status, headers, body]
end