Rack::Secure::Referer Sanitize request.referer for preventing XSS Installation gem 'rack-secure-referer' And then execute: $ bundle Or install it yourself as: $ gem install rack-secure-referer