Skip to content

Commit 612105b

Browse files
committedNov 21, 2020
should work
1 parent b3d80bf commit 612105b

File tree

5 files changed

+21
-8
lines changed

5 files changed

+21
-8
lines changed
 

‎README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Secure Headers
2+
3+
Secure headers will help you to keep up with the new security headers. Just hit Analyze! and see what you're missing.

‎popup.css

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
body {
2-
width:400px;
3-
height:300px;
2+
width:300px;
3+
height:400px;
44
}
5+
6+
.button {
7+
position: absolute;
8+
top: 50%;
9+
left: 40%;
10+
}
11+
12+
.wrapper {
13+
text-align: center;
14+
}

‎popup.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
<script type="text/javascript" src="popup.js"></script>
88
</head>
99
<body>
10-
<button id="reload-page">Analyze headers on the current tab</button>
10+
<div class="wrapper">
11+
<button class="button" id="reload-page">Analyze!</button>
12+
</div>
1113
<h1 id="title" hidden>Secure Headers</h1>
1214
</body>
1315
<script type="text/javascript" src="refresh.js"></script>

‎popup.js

-4
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ function updateView(url, headers) {
4141
missingHeaders = missingSecurityHeaders(headers);
4242
missingHeadersHTML = showHeaders(missingHeaders, 'missing-headers');
4343
div.appendChild(missingHeadersHTML);
44-
allHeadersButton = document.createElement("button");
45-
allHeadersButtonText = document.createTextNode("All headers");
46-
allHeadersButton.appendChild(allHeadersButtonText);
4744
div.appendChild(document.createElement("br"));
48-
div.appendChild(allHeadersButton);
4945
document.body.appendChild(div);
5046
}
5147

‎security_headers.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
security_headers = [
22
'x-frame-options',
33
'x-xss-protection',
4-
'random-security-header'
4+
'content-security-policy',
5+
'strict-transport-security',
6+
'upgrade-insecure-requests'
57
]

0 commit comments

Comments
 (0)
Please sign in to comment.