Module: Upjs::Rails::RequestEchoHeaders
- Defined in:
- lib/upjs/rails/request_echo_headers.rb
Overview
Installs a before_filter into all controllers which echoes the
request's URL as a response header X-Up-Location and the request's
HTTP method as X-Up-Method.
The Up.js frontend requires these headers to detect redirects, which are otherwise undetectable for an AJAX client.
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
12 13 14 |
# File 'lib/upjs/rails/request_echo_headers.rb', line 12 def self.included(base) base.before_filter :set_up_request_echo_headers end |