Skip to content
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.

Commit

Permalink
Merge pull request #28 from mrhead/set-xhr-redirect-header
Browse files Browse the repository at this point in the history
Set X-XHR-Redirect header
  • Loading branch information
rafaelfranca committed Sep 28, 2018
2 parents e9ebf31 + 56cf714 commit 2f42a3e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/turbolinks/redirection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def visit_location_with_turbolinks(location, action)
self.status = 200
self.response_body = script.join("\n")
response.content_type = "text/javascript"
response.headers["X-Xhr-Redirect"] = location
end

def store_turbolinks_location_in_session(location)
Expand Down

0 comments on commit 2f42a3e

Please sign in to comment.