Skip to content

Commit

Permalink
Add upgrade.badssl.com for upgrade-insecure-requests. Closes #78.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarron committed Oct 7, 2015
1 parent f226d1a commit 7ccd7db
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 0 deletions.
1 change: 1 addition & 0 deletions domains/misc/badssl.com/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@
<a href="https://mixed.badssl.com/mixed/font" class="more bad no-interstitial">mixed/font</a>
<a href="https://long-extended-subdomain-name-containing-many-letters-and-dashes.badssl.com/" class="more good">long-extended-subdomain-name-containing-many-letters-and-dashes</a>
<a href="https://longextendedsubdomainnamewithoutdashesinordertotestwordwrapping.badssl.com/" class="more good">longextended<wbr>subdomainname<wbr>withoutdashes<wbr>inordertotest<wbr>wordwrapping</a>
<a href="https://upgrade.badssl.com/" class="more good">upgrade</a>
<div class="browser-info">
<span id="ua"></span>
<br>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions domains/mixed/upgrade.badssl.com-https/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!doctype html>
<html>
<head>
<title>upgrade.badssl.com</title>
<link rel="shortcut icon" href="/icons/favicon-green.ico"/>
<link rel="apple-touch-icon" href="/icons/icon-green.png"/>
<style>
html, body {
background: #484;

margin: 0;
padding: 0;

height: 100%;
display: -webkit-flexbox;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
}
h1 {
color: white;
text-align: center;
font-family: "Source Code Pro", Monaco, Consolas, "Courier New", monospace, Impact;
font-size: 5em;
font-size: 8vw;
text-shadow:
0 0 20px rgba(255, 255, 255, 0.5),
0 0 40px rgba(255, 255, 255, 0.5),
0 0 60px rgba(255, 255, 255, 0.5);
}
.footer {
background: rgba(0, 0, 0, 0.25);

position: fixed;
width: 80vw;
bottom: 0;
left: 0;
padding: 2vh 10vw;

font-family: Helvetica, Tahoma, sans-serif;
text-align: center;
color: white;
font-size: 6vw;
}
#http-vs-https {
width: 80vw;
vertical-align: middle;
}
</style>
</head>
<body>
<h1>upgrade.badssl.com</h1>
<div class="footer"><img id="http-vs-https" src="http://upgrade.badssl.com/upgrade-test/upgrade-test.svg" title="This is an image with an HTTP source location specified. If upgrade-insecure-requests is working, the source should be rewritten to HTTPS. The image will vary depending on the outcome."></div>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions domains/mixed/upgrade.badssl.com.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
server {
listen 80;
server_name upgrade.badssl.com;

location = / {
return 301 https://$server_name$request_uri;
}

location / {
root /var/www/badssl/domains/mixed/upgrade.badssl.com-http;
try_files $uri $uri/ =404;
}

}

server {
listen 443;
server_name upgrade.badssl.com;

include /var/www/badssl/nginx-includes/wildcard.normal.conf;
include /var/www/badssl/nginx-includes/tls-defaults.conf;
include /var/www/badssl/common/common.conf;

add_header Content-Security-Policy "upgrade-insecure-requests";

root /var/www/badssl/domains/mixed/upgrade.badssl.com-https;
}

0 comments on commit 7ccd7db

Please sign in to comment.