{"action":"created","comment":{"url":"https://api.github.com/repos/hackersatcambridge/hac-website/pulls/comments/156554712","pull_request_review_id":83050849,"id":156554712,"diff_hunk":"@@ -39,6 +40,9 @@ func getWebsiteRouter() -> Router {\n \n   router.all(\"/\", middleware: NotFoundMiddleware())\n \n+  // Enable http gzip compression globally\n+  router.all(middleware: Compression())","path":"Sources/HaCWebsiteLib/routes.swift","position":12,"original_position":12,"commit_id":"a249d0a9616f0f3a16bbd9a47ec5675af7e3dd40","original_commit_id":"a249d0a9616f0f3a16bbd9a47ec5675af7e3dd40","user":{"login":"eliotlim","id":710625,"avatar_url":"https://avatars0.githubusercontent.com/u/710625?v=4","gravatar_id":"","url":"https://api.github.com/users/eliotlim","html_url":"https://github.com/eliotlim","followers_url":"https://api.github.com/users/eliotlim/followers","following_url":"https://api.github.com/users/eliotlim/following{/other_user}","gists_url":"https://api.github.com/users/eliotlim/gists{/gist_id}","starred_url":"https://api.github.com/users/eliotlim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliotlim/subscriptions","organizations_url":"https://api.github.com/users/eliotlim/orgs","repos_url":"https://api.github.com/users/eliotlim/repos","events_url":"https://api.github.com/users/eliotlim/events{/privacy}","received_events_url":"https://api.github.com/users/eliotlim/received_events","type":"User","site_admin":false},"body":"I have experimented with placing the compression middleware at various points in the middleware chain. Placing it before some of the middleware seems to cause page rendering to break, and placing it after most of the middleware (for instance, right after the `NotFoundMiddleware`) has no visible impact on the page load or content encoding in transit.\r\n\r\nIn the interest of best practice, I suppose placing it at the end of the middleware chain makes the most sense since compressing the content should occur transparently and be one of the last transformations prior to transmission. It also makes adding router middleware / routes in the future less likely to break things.\r\n\r\nPerhaps as suggested, a comment could be added to explain compression being at the end of the middleware chain.","created_at":"2017-12-13T03:04:29Z","updated_at":"2017-12-13T03:04:29Z","html_url":"https://github.com/hackersatcambridge/hac-website/pull/150#discussion_r156554712","pull_request_url":"https://api.github.com/repos/hackersatcambridge/hac-website/pulls/150","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/hackersatcambridge/hac-website/pulls/comments/156554712"},"html":{"href":"https://github.com/hackersatcambridge/hac-website/pull/150#discussion_r156554712"},"pull_request":{"href":"https://api.github.com/repos/hackersatcambridge/hac-website/pulls/150"}},"in_reply_to_id":152767422},"pull_request":{"url":"https://api.github.com/repos/hackersatcambridge/hac-website/pulls/150","id":154027379,"html_url":"https://github.com/hackersatcambridge/hac-website/pull/150","diff_url":"https://github.com/hackersatcambridge/hac-website/pull/150.diff","patch_url":"https://github.com/hackersatcambridge/hac-website/pull/150.patch","issue_url":"https://api.github.com/repos/hackersatcambridge/hac-website/issues/150","number":150,"state":"open","locked":false,"title":"Use http gzip compression for serving all resources","user":{"login":"eliotlim","id":710625,"avatar_url":"https://avatars0.githubusercontent.com/u/710625?v=4","gravatar_id":"","url":"https://api.github.com/users/eliotlim","html_url":"https://github.com/eliotlim","followers_url":"https://api.github.com/users/eliotlim/followers","following_url":"https://api.github.com/users/eliotlim/following{/other_user}","gists_url":"https://api.github.com/users/eliotlim/gists{/gist_id}","starred_url":"https://api.github.com/users/eliotlim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliotlim/subscriptions","organizations_url":"https://api.github.com/users/eliotlim/orgs","repos_url":"https://api.github.com/users/eliotlim/repos","events_url":"https://api.github.com/users/eliotlim/events{/privacy}","received_events_url":"https://api.github.com/users/eliotlim/received_events","type":"User","site_admin":false},"body":"Fixes #18 Served content should be gzipped.\r\n\r\nUses [Kitura-Compression](https://github.com/IBM-Swift/Kitura-Compression) to provide Compression middleware.\r\nAll resources will be served using the gzip standard by default.\r\nAt this stage, parameters used are defaults but can be configured at a later date.","created_at":"2017-11-21T23:27:05Z","updated_at":"2017-12-13T03:04:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e93d076064415629b055c44e98900f070e19e1f5","assignee":{"login":"eliotlim","id":710625,"avatar_url":"https://avatars0.githubusercontent.com/u/710625?v=4","gravatar_id":"","url":"https://api.github.com/users/eliotlim","html_url":"https://github.com/eliotlim","followers_url":"https://api.github.com/users/eliotlim/followers","following_url":"https://api.github.com/users/eliotlim/following{/other_user}","gists_url":"https://api.github.com/users/eliotlim/gists{/gist_id}","starred_url":"https://api.github.com/users/eliotlim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliotlim/subscriptions","organizations_url":"https://api.github.com/users/eliotlim/orgs","repos_url":"https://api.github.com/users/eliotlim/repos","events_url":"https://api.github.com/users/eliotlim/events{/privacy}","received_events_url":"https://api.github.com/users/eliotlim/received_events","type":"User","site_admin":false},"assignees":[{"login":"eliotlim","id":710625,"avatar_url":"https://avatars0.githubusercontent.com/u/710625?v=4","gravatar_id":"","url":"https://api.github.com/users/eliotlim","html_url":"https://github.com/eliotlim","followers_url":"https://api.github.com/users/eliotlim/followers","following_url":"https://api.github.com/users/eliotlim/following{/other_user}","gists_url":"https://api.github.com/users/eliotlim/gists{/gist_id}","starred_url":"https://api.github.com/users/eliotlim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliotlim/subscriptions","organizations_url":"https://api.github.com/users/eliotlim/orgs","repos_url":"https://api.github.com/users/eliotlim/repos","events_url":"https://api.github.com/users/eliotlim/events{/privacy}","received_events_url":"https://api.github.com/users/eliotlim/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"jaredkhan","id":3105017,"avatar_url":"https://avatars1.githubusercontent.com/u/3105017?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredkhan","html_url":"https://github.com/jaredkhan","followers_url":"https://api.github.com/users/jaredkhan/followers","following_url":"https://api.github.com/users/jaredkhan/following{/other_user}","gists_url":"https://api.github.com/users/jaredkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredkhan/subscriptions","organizations_url":"https://api.github.com/users/jaredkhan/orgs","repos_url":"https://api.github.com/users/jaredkhan/repos","events_url":"https://api.github.com/users/jaredkhan/events{/privacy}","received_events_url":"https://api.github.com/users/jaredkhan/received_events","type":"User","site_admin":false},{"login":"CharlieCrisp","id":23122367,"avatar_url":"https://avatars3.githubusercontent.com/u/23122367?v=4","gravatar_id":"","url":"https://api.github.com/users/CharlieCrisp","html_url":"https://github.com/CharlieCrisp","followers_url":"https://api.github.com/users/CharlieCrisp/followers","following_url":"https://api.github.com/users/CharlieCrisp/following{/other_user}","gists_url":"https://api.github.com/users/CharlieCrisp/gists{/gist_id}","starred_url":"https://api.github.com/users/CharlieCrisp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CharlieCrisp/subscriptions","organizations_url":"https://api.github.com/users/CharlieCrisp/orgs","repos_url":"https://api.github.com/users/CharlieCrisp/repos","events_url":"https://api.github.com/users/CharlieCrisp/events{/privacy}","received_events_url":"https://api.github.com/users/CharlieCrisp/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/hackersatcambridge/hac-website/pulls/150/commits","review_comments_url":"https://api.github.com/repos/hackersatcambridge/hac-website/pulls/150/comments","review_comment_url":"https://api.github.com/repos/hackersatcambridge/hac-website/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hackersatcambridge/hac-website/issues/150/comments","statuses_url":"https://api.github.com/repos/hackersatcambridge/hac-website/statuses/a249d0a9616f0f3a16bbd9a47ec5675af7e3dd40","head":{"label":"eliotlim:use-http-gzip-compression-globally","ref":"use-http-gzip-compression-globally","sha":"a249d0a9616f0f3a16bbd9a47ec5675af7e3dd40","user":{"login":"eliotlim","id":710625,"avatar_url":"https://avatars0.githubusercontent.com/u/710625?v=4","gravatar_id":"","url":"https://api.github.com/users/eliotlim","html_url":"https://github.com/eliotlim","followers_url":"https://api.github.com/users/eliotlim/followers","following_url":"https://api.github.com/users/eliotlim/following{/other_user}","gists_url":"https://api.github.com/users/eliotlim/gists{/gist_id}","starred_url":"https://api.github.com/users/eliotlim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliotlim/subscriptions","organizations_url":"https://api.github.com/users/eliotlim/orgs","repos_url":"https://api.github.com/users/eliotlim/repos","events_url":"https://api.github.com/users/eliotlim/events{/privacy}","received_events_url":"https://api.github.com/users/eliotlim/received_events","type":"User","site_admin":false},"repo":{"id":111592403,"name":"hac-website","full_name":"eliotlim/hac-website","owner":{"login":"eliotlim","id":710625,"avatar_url":"https://avatars0.githubusercontent.com/u/710625?v=4","gravatar_id":"","url":"https://api.github.com/users/eliotlim","html_url":"https://github.com/eliotlim","followers_url":"https://api.github.com/users/eliotlim/followers","following_url":"https://api.github.com/users/eliotlim/following{/other_user}","gists_url":"https://api.github.com/users/eliotlim/gists{/gist_id}","starred_url":"https://api.github.com/users/eliotlim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliotlim/subscriptions","organizations_url":"https://api.github.com/users/eliotlim/orgs","repos_url":"https://api.github.com/users/eliotlim/repos","events_url":"https://api.github.com/users/eliotlim/events{/privacy}","received_events_url":"https://api.github.com/users/eliotlim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eliotlim/hac-website","description":"The Hackers at Cambridge Website Repo","fork":true,"url":"https://api.github.com/repos/eliotlim/hac-website","forks_url":"https://api.github.com/repos/eliotlim/hac-website/forks","keys_url":"https://api.github.com/repos/eliotlim/hac-website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eliotlim/hac-website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eliotlim/hac-website/teams","hooks_url":"https://api.github.com/repos/eliotlim/hac-website/hooks","issue_events_url":"https://api.github.com/repos/eliotlim/hac-website/issues/events{/number}","events_url":"https://api.github.com/repos/eliotlim/hac-website/events","assignees_url":"https://api.github.com/repos/eliotlim/hac-website/assignees{/user}","branches_url":"https://api.github.com/repos/eliotlim/hac-website/branches{/branch}","tags_url":"https://api.github.com/repos/eliotlim/hac-website/tags","blobs_url":"https://api.github.com/repos/eliotlim/hac-website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eliotlim/hac-website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eliotlim/hac-website/git/refs{/sha}","trees_url":"https://api.github.com/repos/eliotlim/hac-website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eliotlim/hac-website/statuses/{sha}","languages_url":"https://api.github.com/repos/eliotlim/hac-website/languages","stargazers_url":"https://api.github.com/repos/eliotlim/hac-website/stargazers","contributors_url":"https://api.github.com/repos/eliotlim/hac-website/contributors","subscribers_url":"https://api.github.com/repos/eliotlim/hac-website/subscribers","subscription_url":"https://api.github.com/repos/eliotlim/hac-website/subscription","commits_url":"https://api.github.com/repos/eliotlim/hac-website/commits{/sha}","git_commits_url":"https://api.github.com/repos/eliotlim/hac-website/git/commits{/sha}","comments_url":"https://api.github.com/repos/eliotlim/hac-website/comments{/number}","issue_comment_url":"https://api.github.com/repos/eliotlim/hac-website/issues/comments{/number}","contents_url":"https://api.github.com/repos/eliotlim/hac-website/contents/{+path}","compare_url":"https://api.github.com/repos/eliotlim/hac-website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eliotlim/hac-website/merges","archive_url":"https://api.github.com/repos/eliotlim/hac-website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eliotlim/hac-website/downloads","issues_url":"https://api.github.com/repos/eliotlim/hac-website/issues{/number}","pulls_url":"https://api.github.com/repos/eliotlim/hac-website/pulls{/number}","milestones_url":"https://api.github.com/repos/eliotlim/hac-website/milestones{/number}","notifications_url":"https://api.github.com/repos/eliotlim/hac-website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eliotlim/hac-website/labels{/name}","releases_url":"https://api.github.com/repos/eliotlim/hac-website/releases{/id}","deployments_url":"https://api.github.com/repos/eliotlim/hac-website/deployments","created_at":"2017-11-21T19:30:10Z","updated_at":"2017-11-21T19:30:12Z","pushed_at":"2017-11-21T23:12:07Z","git_url":"git://github.com/eliotlim/hac-website.git","ssh_url":"git@github.com:eliotlim/hac-website.git","clone_url":"https://github.com/eliotlim/hac-website.git","svn_url":"https://github.com/eliotlim/hac-website","homepage":"https://hackersatcambridge.com","size":10257,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hackersatcambridge:master","ref":"master","sha":"bd0a7a65d8d13ed27eec05af0c7d47ecf2242ccf","user":{"login":"hackersatcambridge","id":15255484,"avatar_url":"https://avatars1.githubusercontent.com/u/15255484?v=4","gravatar_id":"","url":"https://api.github.com/users/hackersatcambridge","html_url":"https://github.com/hackersatcambridge","followers_url":"https://api.github.com/users/hackersatcambridge/followers","following_url":"https://api.github.com/users/hackersatcambridge/following{/other_user}","gists_url":"https://api.github.com/users/hackersatcambridge/gists{/gist_id}","starred_url":"https://api.github.com/users/hackersatcambridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackersatcambridge/subscriptions","organizations_url":"https://api.github.com/users/hackersatcambridge/orgs","repos_url":"https://api.github.com/users/hackersatcambridge/repos","events_url":"https://api.github.com/users/hackersatcambridge/events{/privacy}","received_events_url":"https://api.github.com/users/hackersatcambridge/received_events","type":"Organization","site_admin":false},"repo":{"id":81341682,"name":"hac-website","full_name":"hackersatcambridge/hac-website","owner":{"login":"hackersatcambridge","id":15255484,"avatar_url":"https://avatars1.githubusercontent.com/u/15255484?v=4","gravatar_id":"","url":"https://api.github.com/users/hackersatcambridge","html_url":"https://github.com/hackersatcambridge","followers_url":"https://api.github.com/users/hackersatcambridge/followers","following_url":"https://api.github.com/users/hackersatcambridge/following{/other_user}","gists_url":"https://api.github.com/users/hackersatcambridge/gists{/gist_id}","starred_url":"https://api.github.com/users/hackersatcambridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackersatcambridge/subscriptions","organizations_url":"https://api.github.com/users/hackersatcambridge/orgs","repos_url":"https://api.github.com/users/hackersatcambridge/repos","events_url":"https://api.github.com/users/hackersatcambridge/events{/privacy}","received_events_url":"https://api.github.com/users/hackersatcambridge/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hackersatcambridge/hac-website","description":"The Hackers at Cambridge Website Repo","fork":false,"url":"https://api.github.com/repos/hackersatcambridge/hac-website","forks_url":"https://api.github.com/repos/hackersatcambridge/hac-website/forks","keys_url":"https://api.github.com/repos/hackersatcambridge/hac-website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hackersatcambridge/hac-website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hackersatcambridge/hac-website/teams","hooks_url":"https://api.github.com/repos/hackersatcambridge/hac-website/hooks","issue_events_url":"https://api.github.com/repos/hackersatcambridge/hac-website/issues/events{/number}","events_url":"https://api.github.com/repos/hackersatcambridge/hac-website/events","assignees_url":"https://api.github.com/repos/hackersatcambridge/hac-website/assignees{/user}","branches_url":"https://api.github.com/repos/hackersatcambridge/hac-website/branches{/branch}","tags_url":"https://api.github.com/repos/hackersatcambridge/hac-website/tags","blobs_url":"https://api.github.com/repos/hackersatcambridge/hac-website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hackersatcambridge/hac-website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hackersatcambridge/hac-website/git/refs{/sha}","trees_url":"https://api.github.com/repos/hackersatcambridge/hac-website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hackersatcambridge/hac-website/statuses/{sha}","languages_url":"https://api.github.com/repos/hackersatcambridge/hac-website/languages","stargazers_url":"https://api.github.com/repos/hackersatcambridge/hac-website/stargazers","contributors_url":"https://api.github.com/repos/hackersatcambridge/hac-website/contributors","subscribers_url":"https://api.github.com/repos/hackersatcambridge/hac-website/subscribers","subscription_url":"https://api.github.com/repos/hackersatcambridge/hac-website/subscription","commits_url":"https://api.github.com/repos/hackersatcambridge/hac-website/commits{/sha}","git_commits_url":"https://api.github.com/repos/hackersatcambridge/hac-website/git/commits{/sha}","comments_url":"https://api.github.com/repos/hackersatcambridge/hac-website/comments{/number}","issue_comment_url":"https://api.github.com/repos/hackersatcambridge/hac-website/issues/comments{/number}","contents_url":"https://api.github.com/repos/hackersatcambridge/hac-website/contents/{+path}","compare_url":"https://api.github.com/repos/hackersatcambridge/hac-website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hackersatcambridge/hac-website/merges","archive_url":"https://api.github.com/repos/hackersatcambridge/hac-website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hackersatcambridge/hac-website/downloads","issues_url":"https://api.github.com/repos/hackersatcambridge/hac-website/issues{/number}","pulls_url":"https://api.github.com/repos/hackersatcambridge/hac-website/pulls{/number}","milestones_url":"https://api.github.com/repos/hackersatcambridge/hac-website/milestones{/number}","notifications_url":"https://api.github.com/repos/hackersatcambridge/hac-website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hackersatcambridge/hac-website/labels{/name}","releases_url":"https://api.github.com/repos/hackersatcambridge/hac-website/releases{/id}","deployments_url":"https://api.github.com/repos/hackersatcambridge/hac-website/deployments","created_at":"2017-02-08T15:04:23Z","updated_at":"2017-12-06T10:31:12Z","pushed_at":"2017-12-11T17:28:02Z","git_url":"git://github.com/hackersatcambridge/hac-website.git","ssh_url":"git@github.com:hackersatcambridge/hac-website.git","clone_url":"https://github.com/hackersatcambridge/hac-website.git","svn_url":"https://github.com/hackersatcambridge/hac-website","homepage":"https://hackersatcambridge.com","size":17426,"stargazers_count":13,"watchers_count":13,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":51,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":9,"open_issues":51,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hackersatcambridge/hac-website/pulls/150"},"html":{"href":"https://github.com/hackersatcambridge/hac-website/pull/150"},"issue":{"href":"https://api.github.com/repos/hackersatcambridge/hac-website/issues/150"},"comments":{"href":"https://api.github.com/repos/hackersatcambridge/hac-website/issues/150/comments"},"review_comments":{"href":"https://api.github.com/repos/hackersatcambridge/hac-website/pulls/150/comments"},"review_comment":{"href":"https://api.github.com/repos/hackersatcambridge/hac-website/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hackersatcambridge/hac-website/pulls/150/commits"},"statuses":{"href":"https://api.github.com/repos/hackersatcambridge/hac-website/statuses/a249d0a9616f0f3a16bbd9a47ec5675af7e3dd40"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"eliotlim"}}