{"action":"opened","number":685,"pull_request":{"url":"https://api.github.com/repos/biglotteryfund/blf-alpha/pulls/685","id":169978607,"html_url":"https://github.com/biglotteryfund/blf-alpha/pull/685","diff_url":"https://github.com/biglotteryfund/blf-alpha/pull/685.diff","patch_url":"https://github.com/biglotteryfund/blf-alpha/pull/685.patch","issue_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/issues/685","number":685,"state":"open","locked":false,"title":"Fix tool caching","user":{"login":"mattandrews","id":394376,"avatar_url":"https://avatars0.githubusercontent.com/u/394376?v=4","gravatar_id":"","url":"https://api.github.com/users/mattandrews","html_url":"https://github.com/mattandrews","followers_url":"https://api.github.com/users/mattandrews/followers","following_url":"https://api.github.com/users/mattandrews/following{/other_user}","gists_url":"https://api.github.com/users/mattandrews/gists{/gist_id}","starred_url":"https://api.github.com/users/mattandrews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattandrews/subscriptions","organizations_url":"https://api.github.com/users/mattandrews/orgs","repos_url":"https://api.github.com/users/mattandrews/repos","events_url":"https://api.github.com/users/mattandrews/events{/privacy}","received_events_url":"https://api.github.com/users/mattandrews/received_events","type":"User","site_admin":false},"body":"If you try to visit something restricted behind an auth check (eg. survey results), you'll be redirected to the login form. Once logging in, though, you'll be redirected back to the survey results, which has cached your unauthorised state, and sent back to the login form (which detects that you're logged in, so sends you to the dashboard).\r\n\r\nThis PR fixes things by setting the `no-cache` header earlier in the middleware chain (and fixing it in a few other places) so the HTTP redirect itself isn't cached.\r\n\r\neg:\r\n\r\n```\r\ncurl -I $surveyResultUrl\r\nHTTP/1.1 302 Moved Temporarily\r\nContent-Type: text/plain; charset=utf-8\r\nCache-Control: max-age=300\r\nLocation: /user/login\r\n```\r\n","created_at":"2018-02-19T14:43:48Z","updated_at":"2018-02-19T14:43:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/pulls/685/commits","review_comments_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/pulls/685/comments","review_comment_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/issues/685/comments","statuses_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/statuses/0a0138d60941bb9ae274109bb5b1119c3262bf86","head":{"label":"biglotteryfund:fix-auth-caching","ref":"fix-auth-caching","sha":"0a0138d60941bb9ae274109bb5b1119c3262bf86","user":{"login":"biglotteryfund","id":26795798,"avatar_url":"https://avatars1.githubusercontent.com/u/26795798?v=4","gravatar_id":"","url":"https://api.github.com/users/biglotteryfund","html_url":"https://github.com/biglotteryfund","followers_url":"https://api.github.com/users/biglotteryfund/followers","following_url":"https://api.github.com/users/biglotteryfund/following{/other_user}","gists_url":"https://api.github.com/users/biglotteryfund/gists{/gist_id}","starred_url":"https://api.github.com/users/biglotteryfund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biglotteryfund/subscriptions","organizations_url":"https://api.github.com/users/biglotteryfund/orgs","repos_url":"https://api.github.com/users/biglotteryfund/repos","events_url":"https://api.github.com/users/biglotteryfund/events{/privacy}","received_events_url":"https://api.github.com/users/biglotteryfund/received_events","type":"Organization","site_admin":false},"repo":{"id":86326904,"name":"blf-alpha","full_name":"biglotteryfund/blf-alpha","owner":{"login":"biglotteryfund","id":26795798,"avatar_url":"https://avatars1.githubusercontent.com/u/26795798?v=4","gravatar_id":"","url":"https://api.github.com/users/biglotteryfund","html_url":"https://github.com/biglotteryfund","followers_url":"https://api.github.com/users/biglotteryfund/followers","following_url":"https://api.github.com/users/biglotteryfund/following{/other_user}","gists_url":"https://api.github.com/users/biglotteryfund/gists{/gist_id}","starred_url":"https://api.github.com/users/biglotteryfund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biglotteryfund/subscriptions","organizations_url":"https://api.github.com/users/biglotteryfund/orgs","repos_url":"https://api.github.com/users/biglotteryfund/repos","events_url":"https://api.github.com/users/biglotteryfund/events{/privacy}","received_events_url":"https://api.github.com/users/biglotteryfund/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biglotteryfund/blf-alpha","description":"The Big Lottery Fund gives grants to organisations in the UK to help improve their communities. The money awarded comes from the UK National Lottery.","fork":false,"url":"https://api.github.com/repos/biglotteryfund/blf-alpha","forks_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/forks","keys_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/teams","hooks_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/hooks","issue_events_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/issues/events{/number}","events_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/events","assignees_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/assignees{/user}","branches_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/branches{/branch}","tags_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/tags","blobs_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/git/refs{/sha}","trees_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/statuses/{sha}","languages_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/languages","stargazers_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/stargazers","contributors_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/contributors","subscribers_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/subscribers","subscription_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/subscription","commits_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/commits{/sha}","git_commits_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/git/commits{/sha}","comments_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/comments{/number}","issue_comment_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/issues/comments{/number}","contents_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/contents/{+path}","compare_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/merges","archive_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/downloads","issues_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/issues{/number}","pulls_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/pulls{/number}","milestones_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/milestones{/number}","notifications_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/labels{/name}","releases_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/releases{/id}","deployments_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/deployments","created_at":"2017-03-27T11:24:13Z","updated_at":"2017-12-31T13:01:19Z","pushed_at":"2018-02-19T14:40:05Z","git_url":"git://github.com/biglotteryfund/blf-alpha.git","ssh_url":"git@github.com:biglotteryfund/blf-alpha.git","clone_url":"https://github.com/biglotteryfund/blf-alpha.git","svn_url":"https://github.com/biglotteryfund/blf-alpha","homepage":"https://www.biglotteryfund.org.uk","size":43191,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":80,"license":null,"forks":0,"open_issues":80,"watchers":4,"default_branch":"master"}},"base":{"label":"biglotteryfund:master","ref":"master","sha":"ef2139a910e2e923b2f5c36cb6227594bb6706a1","user":{"login":"biglotteryfund","id":26795798,"avatar_url":"https://avatars1.githubusercontent.com/u/26795798?v=4","gravatar_id":"","url":"https://api.github.com/users/biglotteryfund","html_url":"https://github.com/biglotteryfund","followers_url":"https://api.github.com/users/biglotteryfund/followers","following_url":"https://api.github.com/users/biglotteryfund/following{/other_user}","gists_url":"https://api.github.com/users/biglotteryfund/gists{/gist_id}","starred_url":"https://api.github.com/users/biglotteryfund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biglotteryfund/subscriptions","organizations_url":"https://api.github.com/users/biglotteryfund/orgs","repos_url":"https://api.github.com/users/biglotteryfund/repos","events_url":"https://api.github.com/users/biglotteryfund/events{/privacy}","received_events_url":"https://api.github.com/users/biglotteryfund/received_events","type":"Organization","site_admin":false},"repo":{"id":86326904,"name":"blf-alpha","full_name":"biglotteryfund/blf-alpha","owner":{"login":"biglotteryfund","id":26795798,"avatar_url":"https://avatars1.githubusercontent.com/u/26795798?v=4","gravatar_id":"","url":"https://api.github.com/users/biglotteryfund","html_url":"https://github.com/biglotteryfund","followers_url":"https://api.github.com/users/biglotteryfund/followers","following_url":"https://api.github.com/users/biglotteryfund/following{/other_user}","gists_url":"https://api.github.com/users/biglotteryfund/gists{/gist_id}","starred_url":"https://api.github.com/users/biglotteryfund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biglotteryfund/subscriptions","organizations_url":"https://api.github.com/users/biglotteryfund/orgs","repos_url":"https://api.github.com/users/biglotteryfund/repos","events_url":"https://api.github.com/users/biglotteryfund/events{/privacy}","received_events_url":"https://api.github.com/users/biglotteryfund/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biglotteryfund/blf-alpha","description":"The Big Lottery Fund gives grants to organisations in the UK to help improve their communities. The money awarded comes from the UK National Lottery.","fork":false,"url":"https://api.github.com/repos/biglotteryfund/blf-alpha","forks_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/forks","keys_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/teams","hooks_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/hooks","issue_events_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/issues/events{/number}","events_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/events","assignees_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/assignees{/user}","branches_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/branches{/branch}","tags_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/tags","blobs_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/git/refs{/sha}","trees_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/statuses/{sha}","languages_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/languages","stargazers_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/stargazers","contributors_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/contributors","subscribers_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/subscribers","subscription_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/subscription","commits_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/commits{/sha}","git_commits_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/git/commits{/sha}","comments_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/comments{/number}","issue_comment_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/issues/comments{/number}","contents_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/contents/{+path}","compare_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/merges","archive_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/downloads","issues_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/issues{/number}","pulls_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/pulls{/number}","milestones_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/milestones{/number}","notifications_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/labels{/name}","releases_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/releases{/id}","deployments_url":"https://api.github.com/repos/biglotteryfund/blf-alpha/deployments","created_at":"2017-03-27T11:24:13Z","updated_at":"2017-12-31T13:01:19Z","pushed_at":"2018-02-19T14:40:05Z","git_url":"git://github.com/biglotteryfund/blf-alpha.git","ssh_url":"git@github.com:biglotteryfund/blf-alpha.git","clone_url":"https://github.com/biglotteryfund/blf-alpha.git","svn_url":"https://github.com/biglotteryfund/blf-alpha","homepage":"https://www.biglotteryfund.org.uk","size":43191,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":80,"license":null,"forks":0,"open_issues":80,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biglotteryfund/blf-alpha/pulls/685"},"html":{"href":"https://github.com/biglotteryfund/blf-alpha/pull/685"},"issue":{"href":"https://api.github.com/repos/biglotteryfund/blf-alpha/issues/685"},"comments":{"href":"https://api.github.com/repos/biglotteryfund/blf-alpha/issues/685/comments"},"review_comments":{"href":"https://api.github.com/repos/biglotteryfund/blf-alpha/pulls/685/comments"},"review_comment":{"href":"https://api.github.com/repos/biglotteryfund/blf-alpha/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biglotteryfund/blf-alpha/pulls/685/commits"},"statuses":{"href":"https://api.github.com/repos/biglotteryfund/blf-alpha/statuses/0a0138d60941bb9ae274109bb5b1119c3262bf86"}},"author_association":"OWNER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":3,"deletions":3,"changed_files":2}}
{"actor":{"display_login":"mattandrews"}}