{"action":"opened","number":2542,"pull_request":{"url":"https://api.github.com/repos/alphagov/notifications-admin/pulls/2542","id":234327871,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0MzI3ODcx","html_url":"https://github.com/alphagov/notifications-admin/pull/2542","diff_url":"https://github.com/alphagov/notifications-admin/pull/2542.diff","patch_url":"https://github.com/alphagov/notifications-admin/pull/2542.patch","issue_url":"https://api.github.com/repos/alphagov/notifications-admin/issues/2542","number":2542,"state":"open","locked":false,"title":"Use static domains for static assets","user":{"login":"quis","id":355079,"node_id":"MDQ6VXNlcjM1NTA3OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/355079?v=4","gravatar_id":"","url":"https://api.github.com/users/quis","html_url":"https://github.com/quis","followers_url":"https://api.github.com/users/quis/followers","following_url":"https://api.github.com/users/quis/following{/other_user}","gists_url":"https://api.github.com/users/quis/gists{/gist_id}","starred_url":"https://api.github.com/users/quis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quis/subscriptions","organizations_url":"https://api.github.com/users/quis/orgs","repos_url":"https://api.github.com/users/quis/repos","events_url":"https://api.github.com/users/quis/events{/privacy}","received_events_url":"https://api.github.com/users/quis/received_events","type":"User","site_admin":false},"body":"Since moving to putting the admin app on Cloudfront anything on the\r\n`www.notifications.service.gov.uk` domain is:\r\n- not gzipped\r\n\r\nThe PaaS proxy used to GZip and set headers for anything served from a path starting with `/static/`:\r\nhttps://github.com/alphagov/notifications-aws/blob/76dd511a8aaa2e4f8ffec17662bbe08841c52455/ansible/roles/paas-proxy/templates/admin.conf.j2#L53-L64\r\n\r\nAnything served from `static.notifications.service.gov.uk` is:\r\n- GZipped\r\n- and as a bonus, cached by Cloudfront where possible (meaning the requests won’t ever hit our app)\r\n\r\nThis commit moves to serving static asset from `/static/` to `static.notifications.service.gov.uk`, to get the above listed benefits.\r\n\r\n# Before \r\n![image](https://user-images.githubusercontent.com/355079/49163455-09e2d400-f325-11e8-9bcd-65c947e66699.png)\r\n\r\n# After \r\n![image](https://user-images.githubusercontent.com/355079/49163483-19fab380-f325-11e8-8899-eae28fcff466.png)\r\n\r\n***\r\n\r\nWe could do even better by setting long cache expiry headers on the static subdomain (currently they’re only set to cache for 60 seconds). But that’s out of scope for this commit.\r\n\r\n\r\n","created_at":"2018-11-28T15:51:00Z","updated_at":"2018-11-28T15:51:00Z","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/alphagov/notifications-admin/pulls/2542/commits","review_comments_url":"https://api.github.com/repos/alphagov/notifications-admin/pulls/2542/comments","review_comment_url":"https://api.github.com/repos/alphagov/notifications-admin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/notifications-admin/issues/2542/comments","statuses_url":"https://api.github.com/repos/alphagov/notifications-admin/statuses/b1c0778bde59043b51204288395601b7ef4f0718","head":{"label":"alphagov:static-domain","ref":"static-domain","sha":"b1c0778bde59043b51204288395601b7ef4f0718","user":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":46421986,"node_id":"MDEwOlJlcG9zaXRvcnk0NjQyMTk4Ng==","name":"notifications-admin","full_name":"alphagov/notifications-admin","private":false,"owner":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/alphagov/notifications-admin","description":"GOV.UK Notify frontend application","fork":false,"url":"https://api.github.com/repos/alphagov/notifications-admin","forks_url":"https://api.github.com/repos/alphagov/notifications-admin/forks","keys_url":"https://api.github.com/repos/alphagov/notifications-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/notifications-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/notifications-admin/teams","hooks_url":"https://api.github.com/repos/alphagov/notifications-admin/hooks","issue_events_url":"https://api.github.com/repos/alphagov/notifications-admin/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/notifications-admin/events","assignees_url":"https://api.github.com/repos/alphagov/notifications-admin/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/notifications-admin/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/notifications-admin/tags","blobs_url":"https://api.github.com/repos/alphagov/notifications-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/notifications-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/notifications-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/notifications-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/notifications-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/notifications-admin/languages","stargazers_url":"https://api.github.com/repos/alphagov/notifications-admin/stargazers","contributors_url":"https://api.github.com/repos/alphagov/notifications-admin/contributors","subscribers_url":"https://api.github.com/repos/alphagov/notifications-admin/subscribers","subscription_url":"https://api.github.com/repos/alphagov/notifications-admin/subscription","commits_url":"https://api.github.com/repos/alphagov/notifications-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/notifications-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/notifications-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/notifications-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/notifications-admin/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/notifications-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/notifications-admin/merges","archive_url":"https://api.github.com/repos/alphagov/notifications-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/notifications-admin/downloads","issues_url":"https://api.github.com/repos/alphagov/notifications-admin/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/notifications-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/notifications-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/notifications-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/notifications-admin/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/notifications-admin/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/notifications-admin/deployments","created_at":"2015-11-18T13:55:17Z","updated_at":"2018-11-28T10:02:39Z","pushed_at":"2018-11-28T15:50:52Z","git_url":"git://github.com/alphagov/notifications-admin.git","ssh_url":"git@github.com:alphagov/notifications-admin.git","clone_url":"https://github.com/alphagov/notifications-admin.git","svn_url":"https://github.com/alphagov/notifications-admin","homepage":"https://www.notifications.service.gov.uk","size":12252,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":14,"open_issues":8,"watchers":9,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"b872ba21a7b60dc2158b10bd532df8b7850f0b77","user":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":46421986,"node_id":"MDEwOlJlcG9zaXRvcnk0NjQyMTk4Ng==","name":"notifications-admin","full_name":"alphagov/notifications-admin","private":false,"owner":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/alphagov/notifications-admin","description":"GOV.UK Notify frontend application","fork":false,"url":"https://api.github.com/repos/alphagov/notifications-admin","forks_url":"https://api.github.com/repos/alphagov/notifications-admin/forks","keys_url":"https://api.github.com/repos/alphagov/notifications-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/notifications-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/notifications-admin/teams","hooks_url":"https://api.github.com/repos/alphagov/notifications-admin/hooks","issue_events_url":"https://api.github.com/repos/alphagov/notifications-admin/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/notifications-admin/events","assignees_url":"https://api.github.com/repos/alphagov/notifications-admin/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/notifications-admin/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/notifications-admin/tags","blobs_url":"https://api.github.com/repos/alphagov/notifications-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/notifications-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/notifications-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/notifications-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/notifications-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/notifications-admin/languages","stargazers_url":"https://api.github.com/repos/alphagov/notifications-admin/stargazers","contributors_url":"https://api.github.com/repos/alphagov/notifications-admin/contributors","subscribers_url":"https://api.github.com/repos/alphagov/notifications-admin/subscribers","subscription_url":"https://api.github.com/repos/alphagov/notifications-admin/subscription","commits_url":"https://api.github.com/repos/alphagov/notifications-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/notifications-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/notifications-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/notifications-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/notifications-admin/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/notifications-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/notifications-admin/merges","archive_url":"https://api.github.com/repos/alphagov/notifications-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/notifications-admin/downloads","issues_url":"https://api.github.com/repos/alphagov/notifications-admin/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/notifications-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/notifications-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/notifications-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/notifications-admin/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/notifications-admin/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/notifications-admin/deployments","created_at":"2015-11-18T13:55:17Z","updated_at":"2018-11-28T10:02:39Z","pushed_at":"2018-11-28T15:50:52Z","git_url":"git://github.com/alphagov/notifications-admin.git","ssh_url":"git@github.com:alphagov/notifications-admin.git","clone_url":"https://github.com/alphagov/notifications-admin.git","svn_url":"https://github.com/alphagov/notifications-admin","homepage":"https://www.notifications.service.gov.uk","size":12252,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":14,"open_issues":8,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/notifications-admin/pulls/2542"},"html":{"href":"https://github.com/alphagov/notifications-admin/pull/2542"},"issue":{"href":"https://api.github.com/repos/alphagov/notifications-admin/issues/2542"},"comments":{"href":"https://api.github.com/repos/alphagov/notifications-admin/issues/2542/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/notifications-admin/pulls/2542/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/notifications-admin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/notifications-admin/pulls/2542/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/notifications-admin/statuses/b1c0778bde59043b51204288395601b7ef4f0718"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":6,"deletions":1,"changed_files":2}}
{"actor":{"display_login":"quis"}}