github / choosealicense.com

A site to provide non-judgmental guidance on choosing a license for your open source project
https://choosealicense.com
MIT License
3.65k stars 1.32k forks source link

Preload HSTS #602

Open lgarron opened 6 years ago

lgarron commented 6 years ago

choosealicense.org has HSTS due to #483.

It would be great to go all the way and preload HSTS: https://hstspreload.org/?domain=choosealicense.org

Steps would be:

@parkr: could you help me find where the HSTS header served by choosealicense.org is configured?

parkr commented 6 years ago

@lgarron Hello! At the moment, we don't have a way to allow users to configure HSTS. Also, I see you have choosealicense.org in your issue, but I believe we're talking about choosealicense.com in this repo, right?

I took a look at a chromium hstspreload checker locally and it seems we have some extra work to do if we are to support this:

~$ hstspreload +d choosealicense.com
Checking domain choosealicense.com for preload requirements...
Observed header: max-age=31557600

Errors:

1. No includeSubDomains directive [header.preloadable.include_sub_domains.missing]
The header must contain the `includeSubDomains` directive.

2. No preload directive [header.preloadable.preload.missing]
The header must contain the `preload` directive.

3. www subdomain does not support HTTPS [domain.www.no_tls]
Domain error: The www subdomain exists, but we couldn't connect to it using HTTPS ("x509: certificate is valid for www.github.com, *.github.io, *.githubusercontent.com, *.github.com, github.com, github.io, githubusercontent.com, not www.choosealicense.com"). Since many people type this by habit, HSTS preloading would likely cause issues for your site.

Warning:

1. Unnecessary HSTS header over HTTP [redirects.http.useless_header]
The HTTP page at http://choosealicense.com sends an HSTS header. This has no effect over HTTP, and should be removed.
lgarron commented 6 years ago

Also, I see you have choosealicense.org in your issue, but I believe we're talking about choosealicense.com in this repo, right?

Ah, yes. Both, preferably. :-D

lgarron commented 5 years ago

@parkr: Is it alright if I add an the HSTS header for choosealicense.com now?

parkr commented 5 years ago

@lgarron Sure!

lgarron commented 5 years ago

I set the header today!

Still requires WWW support to preload.