{"action":"created","comment":{"url":"https://api.github.com/repos/unrolled/secure/pulls/comments/34947910","id":34947910,"diff_hunk":"@@ -192,10 +195,14 @@ func (s *Secure) Process(w http.ResponseWriter, r *http.Request) error {\n \t}\n \n \t// XSS Protection header.\n-\tif s.opt.BrowserXssFilter {\n+\tif s.opt.BrowserXSSFilter {\n \t\tw.Header().Add(xssProtectionHeader, xssProtectionValue)\n \t}\n \n+\tif len(s.opt.PublicKey) > 0 {","path":"secure.go","position":54,"original_position":54,"commit_id":"bacb0d471f97307dc82c80966a7fbb566f35c16a","original_commit_id":"bacb0d471f97307dc82c80966a7fbb566f35c16a","user":{"login":"unrolled","id":407228,"avatar_url":"https://avatars.githubusercontent.com/u/407228?v=3","gravatar_id":"","url":"https://api.github.com/users/unrolled","html_url":"https://github.com/unrolled","followers_url":"https://api.github.com/users/unrolled/followers","following_url":"https://api.github.com/users/unrolled/following{/other_user}","gists_url":"https://api.github.com/users/unrolled/gists{/gist_id}","starred_url":"https://api.github.com/users/unrolled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unrolled/subscriptions","organizations_url":"https://api.github.com/users/unrolled/orgs","repos_url":"https://api.github.com/users/unrolled/repos","events_url":"https://api.github.com/users/unrolled/events{/privacy}","received_events_url":"https://api.github.com/users/unrolled/received_events","type":"User","site_admin":false},"body":"Lets add the development and ssl check here:\r\n`if len(s.opt.PublicKey) > 0 && isSSL && !s.opt.IsDevelopment {`","created_at":"2015-07-18T13:56:03Z","updated_at":"2015-07-18T13:56:03Z","html_url":"https://github.com/unrolled/secure/pull/3#discussion_r34947910","pull_request_url":"https://api.github.com/repos/unrolled/secure/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/unrolled/secure/pulls/comments/34947910"},"html":{"href":"https://github.com/unrolled/secure/pull/3#discussion_r34947910"},"pull_request":{"href":"https://api.github.com/repos/unrolled/secure/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/unrolled/secure/pulls/3","id":40084174,"html_url":"https://github.com/unrolled/secure/pull/3","diff_url":"https://github.com/unrolled/secure/pull/3.diff","patch_url":"https://github.com/unrolled/secure/pull/3.patch","issue_url":"https://api.github.com/repos/unrolled/secure/issues/3","number":3,"state":"open","locked":false,"title":"Master - Added HPKP","user":{"login":"EricLagerg","id":5894247,"avatar_url":"https://avatars.githubusercontent.com/u/5894247?v=3","gravatar_id":"","url":"https://api.github.com/users/EricLagerg","html_url":"https://github.com/EricLagerg","followers_url":"https://api.github.com/users/EricLagerg/followers","following_url":"https://api.github.com/users/EricLagerg/following{/other_user}","gists_url":"https://api.github.com/users/EricLagerg/gists{/gist_id}","starred_url":"https://api.github.com/users/EricLagerg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricLagerg/subscriptions","organizations_url":"https://api.github.com/users/EricLagerg/orgs","repos_url":"https://api.github.com/users/EricLagerg/repos","events_url":"https://api.github.com/users/EricLagerg/events{/privacy}","received_events_url":"https://api.github.com/users/EricLagerg/received_events","type":"User","site_admin":false},"body":"Added HPKP settings. Also changed `BrowserXssFilter` to `BrowserXSSFilter` because of Go's coding standards. (Acronyms are in all caps.)\r\n\r\nSee: https://developer.mozilla.org/en-US/docs/Web/Security/Public_Key_Pinning","created_at":"2015-07-16T00:30:56Z","updated_at":"2015-07-18T13:56:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c558bd9fe0dad4095d4d0d1247d5610ec8e4131f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/unrolled/secure/pulls/3/commits","review_comments_url":"https://api.github.com/repos/unrolled/secure/pulls/3/comments","review_comment_url":"https://api.github.com/repos/unrolled/secure/pulls/comments{/number}","comments_url":"https://api.github.com/repos/unrolled/secure/issues/3/comments","statuses_url":"https://api.github.com/repos/unrolled/secure/statuses/bacb0d471f97307dc82c80966a7fbb566f35c16a","head":{"label":"EricLagerg:master","ref":"master","sha":"bacb0d471f97307dc82c80966a7fbb566f35c16a","user":{"login":"EricLagerg","id":5894247,"avatar_url":"https://avatars.githubusercontent.com/u/5894247?v=3","gravatar_id":"","url":"https://api.github.com/users/EricLagerg","html_url":"https://github.com/EricLagerg","followers_url":"https://api.github.com/users/EricLagerg/followers","following_url":"https://api.github.com/users/EricLagerg/following{/other_user}","gists_url":"https://api.github.com/users/EricLagerg/gists{/gist_id}","starred_url":"https://api.github.com/users/EricLagerg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricLagerg/subscriptions","organizations_url":"https://api.github.com/users/EricLagerg/orgs","repos_url":"https://api.github.com/users/EricLagerg/repos","events_url":"https://api.github.com/users/EricLagerg/events{/privacy}","received_events_url":"https://api.github.com/users/EricLagerg/received_events","type":"User","site_admin":false},"repo":{"id":39166633,"name":"secure","full_name":"EricLagerg/secure","owner":{"login":"EricLagerg","id":5894247,"avatar_url":"https://avatars.githubusercontent.com/u/5894247?v=3","gravatar_id":"","url":"https://api.github.com/users/EricLagerg","html_url":"https://github.com/EricLagerg","followers_url":"https://api.github.com/users/EricLagerg/followers","following_url":"https://api.github.com/users/EricLagerg/following{/other_user}","gists_url":"https://api.github.com/users/EricLagerg/gists{/gist_id}","starred_url":"https://api.github.com/users/EricLagerg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricLagerg/subscriptions","organizations_url":"https://api.github.com/users/EricLagerg/orgs","repos_url":"https://api.github.com/users/EricLagerg/repos","events_url":"https://api.github.com/users/EricLagerg/events{/privacy}","received_events_url":"https://api.github.com/users/EricLagerg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EricLagerg/secure","description":"HTTP middleware for Go that facilitates some quick security wins.","fork":true,"url":"https://api.github.com/repos/EricLagerg/secure","forks_url":"https://api.github.com/repos/EricLagerg/secure/forks","keys_url":"https://api.github.com/repos/EricLagerg/secure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EricLagerg/secure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EricLagerg/secure/teams","hooks_url":"https://api.github.com/repos/EricLagerg/secure/hooks","issue_events_url":"https://api.github.com/repos/EricLagerg/secure/issues/events{/number}","events_url":"https://api.github.com/repos/EricLagerg/secure/events","assignees_url":"https://api.github.com/repos/EricLagerg/secure/assignees{/user}","branches_url":"https://api.github.com/repos/EricLagerg/secure/branches{/branch}","tags_url":"https://api.github.com/repos/EricLagerg/secure/tags","blobs_url":"https://api.github.com/repos/EricLagerg/secure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EricLagerg/secure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EricLagerg/secure/git/refs{/sha}","trees_url":"https://api.github.com/repos/EricLagerg/secure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EricLagerg/secure/statuses/{sha}","languages_url":"https://api.github.com/repos/EricLagerg/secure/languages","stargazers_url":"https://api.github.com/repos/EricLagerg/secure/stargazers","contributors_url":"https://api.github.com/repos/EricLagerg/secure/contributors","subscribers_url":"https://api.github.com/repos/EricLagerg/secure/subscribers","subscription_url":"https://api.github.com/repos/EricLagerg/secure/subscription","commits_url":"https://api.github.com/repos/EricLagerg/secure/commits{/sha}","git_commits_url":"https://api.github.com/repos/EricLagerg/secure/git/commits{/sha}","comments_url":"https://api.github.com/repos/EricLagerg/secure/comments{/number}","issue_comment_url":"https://api.github.com/repos/EricLagerg/secure/issues/comments{/number}","contents_url":"https://api.github.com/repos/EricLagerg/secure/contents/{+path}","compare_url":"https://api.github.com/repos/EricLagerg/secure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EricLagerg/secure/merges","archive_url":"https://api.github.com/repos/EricLagerg/secure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EricLagerg/secure/downloads","issues_url":"https://api.github.com/repos/EricLagerg/secure/issues{/number}","pulls_url":"https://api.github.com/repos/EricLagerg/secure/pulls{/number}","milestones_url":"https://api.github.com/repos/EricLagerg/secure/milestones{/number}","notifications_url":"https://api.github.com/repos/EricLagerg/secure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EricLagerg/secure/labels{/name}","releases_url":"https://api.github.com/repos/EricLagerg/secure/releases{/id}","created_at":"2015-07-15T23:48:13Z","updated_at":"2015-07-15T23:48:13Z","pushed_at":"2015-07-16T00:29:11Z","git_url":"git://github.com/EricLagerg/secure.git","ssh_url":"git@github.com:EricLagerg/secure.git","clone_url":"https://github.com/EricLagerg/secure.git","svn_url":"https://github.com/EricLagerg/secure","homepage":"","size":111,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"v1"}},"base":{"label":"unrolled:master","ref":"master","sha":"b0dfc4c016790a7c4c3a64dbb54d42e21cfaf471","user":{"login":"unrolled","id":407228,"avatar_url":"https://avatars.githubusercontent.com/u/407228?v=3","gravatar_id":"","url":"https://api.github.com/users/unrolled","html_url":"https://github.com/unrolled","followers_url":"https://api.github.com/users/unrolled/followers","following_url":"https://api.github.com/users/unrolled/following{/other_user}","gists_url":"https://api.github.com/users/unrolled/gists{/gist_id}","starred_url":"https://api.github.com/users/unrolled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unrolled/subscriptions","organizations_url":"https://api.github.com/users/unrolled/orgs","repos_url":"https://api.github.com/users/unrolled/repos","events_url":"https://api.github.com/users/unrolled/events{/privacy}","received_events_url":"https://api.github.com/users/unrolled/received_events","type":"User","site_admin":false},"repo":{"id":19994985,"name":"secure","full_name":"unrolled/secure","owner":{"login":"unrolled","id":407228,"avatar_url":"https://avatars.githubusercontent.com/u/407228?v=3","gravatar_id":"","url":"https://api.github.com/users/unrolled","html_url":"https://github.com/unrolled","followers_url":"https://api.github.com/users/unrolled/followers","following_url":"https://api.github.com/users/unrolled/following{/other_user}","gists_url":"https://api.github.com/users/unrolled/gists{/gist_id}","starred_url":"https://api.github.com/users/unrolled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unrolled/subscriptions","organizations_url":"https://api.github.com/users/unrolled/orgs","repos_url":"https://api.github.com/users/unrolled/repos","events_url":"https://api.github.com/users/unrolled/events{/privacy}","received_events_url":"https://api.github.com/users/unrolled/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/unrolled/secure","description":"HTTP middleware for Go that facilitates some quick security wins.","fork":false,"url":"https://api.github.com/repos/unrolled/secure","forks_url":"https://api.github.com/repos/unrolled/secure/forks","keys_url":"https://api.github.com/repos/unrolled/secure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unrolled/secure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unrolled/secure/teams","hooks_url":"https://api.github.com/repos/unrolled/secure/hooks","issue_events_url":"https://api.github.com/repos/unrolled/secure/issues/events{/number}","events_url":"https://api.github.com/repos/unrolled/secure/events","assignees_url":"https://api.github.com/repos/unrolled/secure/assignees{/user}","branches_url":"https://api.github.com/repos/unrolled/secure/branches{/branch}","tags_url":"https://api.github.com/repos/unrolled/secure/tags","blobs_url":"https://api.github.com/repos/unrolled/secure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unrolled/secure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unrolled/secure/git/refs{/sha}","trees_url":"https://api.github.com/repos/unrolled/secure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unrolled/secure/statuses/{sha}","languages_url":"https://api.github.com/repos/unrolled/secure/languages","stargazers_url":"https://api.github.com/repos/unrolled/secure/stargazers","contributors_url":"https://api.github.com/repos/unrolled/secure/contributors","subscribers_url":"https://api.github.com/repos/unrolled/secure/subscribers","subscription_url":"https://api.github.com/repos/unrolled/secure/subscription","commits_url":"https://api.github.com/repos/unrolled/secure/commits{/sha}","git_commits_url":"https://api.github.com/repos/unrolled/secure/git/commits{/sha}","comments_url":"https://api.github.com/repos/unrolled/secure/comments{/number}","issue_comment_url":"https://api.github.com/repos/unrolled/secure/issues/comments{/number}","contents_url":"https://api.github.com/repos/unrolled/secure/contents/{+path}","compare_url":"https://api.github.com/repos/unrolled/secure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unrolled/secure/merges","archive_url":"https://api.github.com/repos/unrolled/secure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unrolled/secure/downloads","issues_url":"https://api.github.com/repos/unrolled/secure/issues{/number}","pulls_url":"https://api.github.com/repos/unrolled/secure/pulls{/number}","milestones_url":"https://api.github.com/repos/unrolled/secure/milestones{/number}","notifications_url":"https://api.github.com/repos/unrolled/secure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unrolled/secure/labels{/name}","releases_url":"https://api.github.com/repos/unrolled/secure/releases{/id}","created_at":"2014-05-20T19:46:28Z","updated_at":"2015-07-18T13:11:02Z","pushed_at":"2015-07-16T00:30:57Z","git_url":"git://github.com/unrolled/secure.git","ssh_url":"git@github.com:unrolled/secure.git","clone_url":"https://github.com/unrolled/secure.git","svn_url":"https://github.com/unrolled/secure","homepage":"","size":267,"stargazers_count":289,"watchers_count":289,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":1,"forks":10,"open_issues":1,"watchers":289,"default_branch":"v1"}},"_links":{"self":{"href":"https://api.github.com/repos/unrolled/secure/pulls/3"},"html":{"href":"https://github.com/unrolled/secure/pull/3"},"issue":{"href":"https://api.github.com/repos/unrolled/secure/issues/3"},"comments":{"href":"https://api.github.com/repos/unrolled/secure/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/unrolled/secure/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/unrolled/secure/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/unrolled/secure/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/unrolled/secure/statuses/bacb0d471f97307dc82c80966a7fbb566f35c16a"}}}}