mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-19 03:26:57 +00:00
Add HSTS & cipher suites, handle fallback cert errors & change default port to 443
This commit is contained in:
parent
0602811709
commit
7c70be21d7
3 changed files with 86 additions and 29 deletions
2
main.go
2
main.go
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue