{"action":"created","issue":{"url":"https://api.github.com/repos/Shopify/shopify_app/issues/153","labels_url":"https://api.github.com/repos/Shopify/shopify_app/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/Shopify/shopify_app/issues/153/comments","events_url":"https://api.github.com/repos/Shopify/shopify_app/issues/153/events","html_url":"https://github.com/Shopify/shopify_app/pull/153","id":99499012,"number":153,"title":"Don't set session[:return_to] if the request is an XHR.","user":{"login":"nickhoffman","id":21668,"avatar_url":"https://avatars.githubusercontent.com/u/21668?v=3","gravatar_id":"","url":"https://api.github.com/users/nickhoffman","html_url":"https://github.com/nickhoffman","followers_url":"https://api.github.com/users/nickhoffman/followers","following_url":"https://api.github.com/users/nickhoffman/following{/other_user}","gists_url":"https://api.github.com/users/nickhoffman/gists{/gist_id}","starred_url":"https://api.github.com/users/nickhoffman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickhoffman/subscriptions","organizations_url":"https://api.github.com/users/nickhoffman/orgs","repos_url":"https://api.github.com/users/nickhoffman/repos","events_url":"https://api.github.com/users/nickhoffman/events{/privacy}","received_events_url":"https://api.github.com/users/nickhoffman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Shopify/shopify_app/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-08-06T18:38:32Z","updated_at":"2015-08-10T18:47:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Shopify/shopify_app/pulls/153","html_url":"https://github.com/Shopify/shopify_app/pull/153","diff_url":"https://github.com/Shopify/shopify_app/pull/153.diff","patch_url":"https://github.com/Shopify/shopify_app/pull/153.patch"},"body":"## Problem\r\n\r\n`session[:return_to]` shouldn't be set if the request is an XHR, because browsing sessions rarely mean to be able to return to XHR paths.\r\n\r\n## Solution\r\n\r\nDon't set it if the request is an XHR.\r\n\r\n/related Shopify/facebook-commerce#3525\r\n/review @kevinhughes27, @peterjm"},"comment":{"url":"https://api.github.com/repos/Shopify/shopify_app/issues/comments/129562492","html_url":"https://github.com/Shopify/shopify_app/pull/153#issuecomment-129562492","issue_url":"https://api.github.com/repos/Shopify/shopify_app/issues/153","id":129562492,"user":{"login":"nickhoffman","id":21668,"avatar_url":"https://avatars.githubusercontent.com/u/21668?v=3","gravatar_id":"","url":"https://api.github.com/users/nickhoffman","html_url":"https://github.com/nickhoffman","followers_url":"https://api.github.com/users/nickhoffman/followers","following_url":"https://api.github.com/users/nickhoffman/following{/other_user}","gists_url":"https://api.github.com/users/nickhoffman/gists{/gist_id}","starred_url":"https://api.github.com/users/nickhoffman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickhoffman/subscriptions","organizations_url":"https://api.github.com/users/nickhoffman/orgs","repos_url":"https://api.github.com/users/nickhoffman/repos","events_url":"https://api.github.com/users/nickhoffman/events{/privacy}","received_events_url":"https://api.github.com/users/nickhoffman/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T18:47:11Z","updated_at":"2015-08-10T18:47:11Z","body":"@peterjm, yes, that's true. But that's already the case and not what this PR is addressing. This PR prevents `session[:return_to]` from being set to a path that was requested via an XHR."}}