Add HSTS & cipher suites, handle fallback cert errors & change default port to 443

This commit is contained in:
Moritz Marquardt 2021-07-13 10:28:36 +02:00
parent 0602811709
commit 7c70be21d7
No known key found for this signature in database
GPG key ID: D5788327BEE388B6
3 changed files with 86 additions and 29 deletions

View file

@ -79,7 +79,7 @@ func main() {
GiteaRoot = bytes.TrimSuffix(GiteaRoot, []byte{'/'})
// Use HOST and PORT environment variables to determine listening address
address := fmt.Sprintf("%s:%s", envOr("HOST", "[::]"), envOr("PORT", "80"))
address := fmt.Sprintf("%s:%s", envOr("HOST", "[::]"), envOr("PORT", "443"))
fmt.Printf("Listening on https://%s\n", address)
// Enable compression by wrapping the handler() method with the compression function provided by FastHTTP