modulepackage
0.0.0-20250204174719-2471e0a70201
Repository: https://github.com/chromium/hstspreload.git
Documentation: pkg.go.dev
# README
HSTS Preload List – Utility Code
HSTS is HTTP Strict Transport Security, which is a policy system for web sites to express a desire only to be contacted over HTTPS.
See https://github.com/chromium/hstspreload.org for the submission site code.
Usage
To check if a domain satisfies the requirements for preloading (assuming $PATH
contains $GOPATH/bin/
):
go install github.com/chromium/hstspreload/...@latest
hstspreload preloadabledomain wikipedia.org
For full documentation, see https://godoc.org/github.com/chromium/hstspreload
# Functions
EligibleDomain checks whether the domain passes HSTS preload requirements for Chromium when it was added using the requirements from PreloadableDomain.
EligibleDomainResponse is like EligibleDomain, but also returns the initial response over HTTPS.
No description provided by the author
EligibleHeaderString is a convenience function that calls ParseHeaderString() and then calls on EligibleHeader() the parsed header.
EligibleResponse checks whether an resp has a single HSTS header that passes the preload requirements.
ParseHeaderString parses an HSTS header.
PreloadableDomain checks whether the domain passes HSTS preload requirements for Chromium.
PreloadableHeader checks whether hstsHeader satisfies all requirements for preloading in Chromium.
PreloadableHeaderString is a convenience function that calls ParseHeaderString() and then calls on PreloadableHeader() the parsed header.
PreloadableResponse checks whether an resp has a single HSTS header that passes the preload requirements.
RemovableDomain checks whether the domain satisfies the requirements for being removed from the Chromium preload list:
- Serving a single valid HSTS header.
RemovableHeader checks whether the header satisfies all requirements for being removed from the Chromium preload list.
RemovableHeaderString is a convenience function that calls ParseHeaderString() and then calls on RemovableHeader() the parsed header.
RemovableResponse checks whether an resp has a single HSTS header that matches the requirements for removal from the HSTS preload list.
# Structs
An HSTSHeader stores the semantics of an HSTS header.
An Issue is an error or a warning relating to a site's HSTS preload configuration.
The Issues struct encapsulates a set of errors and warnings.
MaxAge holds the max-age of an HSTS header in seconds.
# Type aliases
An IssueCode is a string identifier for an Issue.