{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/72654698","id":72654698,"diff_hunk":"@@ -94,11 +94,47 @@ def test_sts_no_include_subdomains(self):\n         \"\"\"\n         With HSTS_SECONDS non-zero and HSTS_INCLUDE_SUBDOMAINS\n         False, the middleware adds a \"strict-transport-security\" header without\n-        the \"includeSubDomains\" tag to the response.\n+        the \"includeSubDomains\" directive to the response.\n         \"\"\"\n         response = self.process_response(secure=True)\n         self.assertEqual(response[\"strict-transport-security\"], \"max-age=600\")\n \n+    @override_settings(","path":"tests/middleware/test_security.py","position":19,"original_position":19,"commit_id":"4cbb3f170233660b740276c1c6f2dea0a18f0335","original_commit_id":"4cbb3f170233660b740276c1c6f2dea0a18f0335","user":{"login":"timgraham","id":411869,"avatar_url":"https://avatars.githubusercontent.com/u/411869?v=3","gravatar_id":"","url":"https://api.github.com/users/timgraham","html_url":"https://github.com/timgraham","followers_url":"https://api.github.com/users/timgraham/followers","following_url":"https://api.github.com/users/timgraham/following{/other_user}","gists_url":"https://api.github.com/users/timgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/timgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgraham/subscriptions","organizations_url":"https://api.github.com/users/timgraham/orgs","repos_url":"https://api.github.com/users/timgraham/repos","events_url":"https://api.github.com/users/timgraham/events{/privacy}","received_events_url":"https://api.github.com/users/timgraham/received_events","type":"User","site_admin":false},"body":"use a single line here (we allow line length up to 119 chars when it improves readability)","created_at":"2016-07-28T16:24:48Z","updated_at":"2016-07-28T16:24:48Z","html_url":"https://github.com/django/django/pull/6974#discussion_r72654698","pull_request_url":"https://api.github.com/repos/django/django/pulls/6974","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/72654698"},"html":{"href":"https://github.com/django/django/pull/6974#discussion_r72654698"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/6974"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/6974","id":78841258,"html_url":"https://github.com/django/django/pull/6974","diff_url":"https://github.com/django/django/pull/6974.diff","patch_url":"https://github.com/django/django/pull/6974.patch","issue_url":"https://api.github.com/repos/django/django/issues/6974","number":6974,"state":"open","locked":false,"title":"Fixed #26947 -- Added an option for the HSTS header preload directive","user":{"login":"edmorley","id":501702,"avatar_url":"https://avatars.githubusercontent.com/u/501702?v=3","gravatar_id":"","url":"https://api.github.com/users/edmorley","html_url":"https://github.com/edmorley","followers_url":"https://api.github.com/users/edmorley/followers","following_url":"https://api.github.com/users/edmorley/following{/other_user}","gists_url":"https://api.github.com/users/edmorley/gists{/gist_id}","starred_url":"https://api.github.com/users/edmorley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edmorley/subscriptions","organizations_url":"https://api.github.com/users/edmorley/orgs","repos_url":"https://api.github.com/users/edmorley/repos","events_url":"https://api.github.com/users/edmorley/events{/privacy}","received_events_url":"https://api.github.com/users/edmorley/received_events","type":"User","site_admin":false},"body":"**1) Added an option for the HSTS header preload directive**\r\nUsers can now set the new `SECURE_HSTS_PRELOAD` preference to `True`, to append the `preload` directive to  the `Strict-Transport-Security` header. This directive is one of the pre-requisites for site owners submitting their domain to the HSTS preload list, which helps protect the first connection to a site, prior to the HSTS header being received. For more information, see [Preloading Strict Transport Security](https://developer.mozilla.org/en-US/docs/Web/Security/HTTP_strict_transport_security#Preloading_Strict_Transport_Security).\r\n\r\nThe existing documentation has also been updated to refer to `includeSubdomains` as a \"directive\" rather than a \"tag\", since the former is how it (and `preload`) are referred to in [the spec](https://tools.ietf.org/html/rfc6797#section-6.1.2).\r\n\r\n**2) Added a deployment system check for SECURE_HSTS_PRELOAD**\r\nThe deployment system checks currently warn if either of `SECURE_HSTS_SECONDS` or `SECURE_HSTS_INCLUDE_SUBDOMAINS` are not set, so adding `SECURE_HSTS_PRELOAD` for consistency, as well as to encourage security best-practices.\r\n\r\n---\r\n\r\nTests passed, using `./runtests.py check_framework middleware` under Python 2.7.\r\n\r\nI'm open to suggestions for tweaks to naming/docs/whether to include the system check or not (and also say if you'd prefer that commit squashed).\r\n\r\nMany thanks! :-)","created_at":"2016-07-26T12:18:02Z","updated_at":"2016-07-28T16:24:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9db716c3d4b87accde6ad7db9cc790f888984699","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/6974/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/6974/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/6974/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/4cbb3f170233660b740276c1c6f2dea0a18f0335","head":{"label":"edmorley:ticket_26947","ref":"ticket_26947","sha":"4cbb3f170233660b740276c1c6f2dea0a18f0335","user":{"login":"edmorley","id":501702,"avatar_url":"https://avatars.githubusercontent.com/u/501702?v=3","gravatar_id":"","url":"https://api.github.com/users/edmorley","html_url":"https://github.com/edmorley","followers_url":"https://api.github.com/users/edmorley/followers","following_url":"https://api.github.com/users/edmorley/following{/other_user}","gists_url":"https://api.github.com/users/edmorley/gists{/gist_id}","starred_url":"https://api.github.com/users/edmorley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edmorley/subscriptions","organizations_url":"https://api.github.com/users/edmorley/orgs","repos_url":"https://api.github.com/users/edmorley/repos","events_url":"https://api.github.com/users/edmorley/events{/privacy}","received_events_url":"https://api.github.com/users/edmorley/received_events","type":"User","site_admin":false},"repo":{"id":54429945,"name":"django","full_name":"edmorley/django","owner":{"login":"edmorley","id":501702,"avatar_url":"https://avatars.githubusercontent.com/u/501702?v=3","gravatar_id":"","url":"https://api.github.com/users/edmorley","html_url":"https://github.com/edmorley","followers_url":"https://api.github.com/users/edmorley/followers","following_url":"https://api.github.com/users/edmorley/following{/other_user}","gists_url":"https://api.github.com/users/edmorley/gists{/gist_id}","starred_url":"https://api.github.com/users/edmorley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edmorley/subscriptions","organizations_url":"https://api.github.com/users/edmorley/orgs","repos_url":"https://api.github.com/users/edmorley/repos","events_url":"https://api.github.com/users/edmorley/events{/privacy}","received_events_url":"https://api.github.com/users/edmorley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edmorley/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/edmorley/django","forks_url":"https://api.github.com/repos/edmorley/django/forks","keys_url":"https://api.github.com/repos/edmorley/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edmorley/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edmorley/django/teams","hooks_url":"https://api.github.com/repos/edmorley/django/hooks","issue_events_url":"https://api.github.com/repos/edmorley/django/issues/events{/number}","events_url":"https://api.github.com/repos/edmorley/django/events","assignees_url":"https://api.github.com/repos/edmorley/django/assignees{/user}","branches_url":"https://api.github.com/repos/edmorley/django/branches{/branch}","tags_url":"https://api.github.com/repos/edmorley/django/tags","blobs_url":"https://api.github.com/repos/edmorley/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edmorley/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edmorley/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/edmorley/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edmorley/django/statuses/{sha}","languages_url":"https://api.github.com/repos/edmorley/django/languages","stargazers_url":"https://api.github.com/repos/edmorley/django/stargazers","contributors_url":"https://api.github.com/repos/edmorley/django/contributors","subscribers_url":"https://api.github.com/repos/edmorley/django/subscribers","subscription_url":"https://api.github.com/repos/edmorley/django/subscription","commits_url":"https://api.github.com/repos/edmorley/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/edmorley/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/edmorley/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/edmorley/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/edmorley/django/contents/{+path}","compare_url":"https://api.github.com/repos/edmorley/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edmorley/django/merges","archive_url":"https://api.github.com/repos/edmorley/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edmorley/django/downloads","issues_url":"https://api.github.com/repos/edmorley/django/issues{/number}","pulls_url":"https://api.github.com/repos/edmorley/django/pulls{/number}","milestones_url":"https://api.github.com/repos/edmorley/django/milestones{/number}","notifications_url":"https://api.github.com/repos/edmorley/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edmorley/django/labels{/name}","releases_url":"https://api.github.com/repos/edmorley/django/releases{/id}","deployments_url":"https://api.github.com/repos/edmorley/django/deployments","created_at":"2016-03-21T23:20:50Z","updated_at":"2016-03-21T23:21:08Z","pushed_at":"2016-07-26T12:23:08Z","git_url":"git://github.com/edmorley/django.git","ssh_url":"git@github.com:edmorley/django.git","clone_url":"https://github.com/edmorley/django.git","svn_url":"https://github.com/edmorley/django","homepage":"https://www.djangoproject.com/","size":132942,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"django:master","ref":"master","sha":"44a6b4028033890d4a3832875c774db321182de6","user":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"repo":{"id":4164482,"name":"django","full_name":"django/django","owner":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django/django","description":"The Web framework for perfectionists with deadlines.","fork":false,"url":"https://api.github.com/repos/django/django","forks_url":"https://api.github.com/repos/django/django/forks","keys_url":"https://api.github.com/repos/django/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django/django/teams","hooks_url":"https://api.github.com/repos/django/django/hooks","issue_events_url":"https://api.github.com/repos/django/django/issues/events{/number}","events_url":"https://api.github.com/repos/django/django/events","assignees_url":"https://api.github.com/repos/django/django/assignees{/user}","branches_url":"https://api.github.com/repos/django/django/branches{/branch}","tags_url":"https://api.github.com/repos/django/django/tags","blobs_url":"https://api.github.com/repos/django/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/django/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django/django/statuses/{sha}","languages_url":"https://api.github.com/repos/django/django/languages","stargazers_url":"https://api.github.com/repos/django/django/stargazers","contributors_url":"https://api.github.com/repos/django/django/contributors","subscribers_url":"https://api.github.com/repos/django/django/subscribers","subscription_url":"https://api.github.com/repos/django/django/subscription","commits_url":"https://api.github.com/repos/django/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/django/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/django/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/django/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/django/django/contents/{+path}","compare_url":"https://api.github.com/repos/django/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django/django/merges","archive_url":"https://api.github.com/repos/django/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django/django/downloads","issues_url":"https://api.github.com/repos/django/django/issues{/number}","pulls_url":"https://api.github.com/repos/django/django/pulls{/number}","milestones_url":"https://api.github.com/repos/django/django/milestones{/number}","notifications_url":"https://api.github.com/repos/django/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django/django/labels{/name}","releases_url":"https://api.github.com/repos/django/django/releases{/id}","deployments_url":"https://api.github.com/repos/django/django/deployments","created_at":"2012-04-28T02:47:18Z","updated_at":"2016-07-28T14:45:14Z","pushed_at":"2016-07-28T16:01:15Z","git_url":"git://github.com/django/django.git","ssh_url":"git@github.com:django/django.git","clone_url":"https://github.com/django/django.git","svn_url":"https://github.com/django/django","homepage":"https://www.djangoproject.com/","size":193550,"stargazers_count":20490,"watchers_count":20490,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8268,"mirror_url":null,"open_issues_count":104,"forks":8268,"open_issues":104,"watchers":20490,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/6974"},"html":{"href":"https://github.com/django/django/pull/6974"},"issue":{"href":"https://api.github.com/repos/django/django/issues/6974"},"comments":{"href":"https://api.github.com/repos/django/django/issues/6974/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/6974/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/6974/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/4cbb3f170233660b740276c1c6f2dea0a18f0335"}}}}
{"actor":{"display_login":"timgraham"}}