Skip to content

Commit

Permalink
first release
Browse files Browse the repository at this point in the history
  • Loading branch information
deemakuzovkin committed Jul 13, 2022
1 parent c8d2f8d commit 5f92171
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/https/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

var (
config, _ = https.LoadConfiguration()
config *https.Configuration
responseTimeout = time.Second
)

Expand All @@ -25,6 +25,12 @@ func redirect(ctx *fasthttp.RequestCtx) {
}

func main() {
configuration, err := https.LoadConfiguration()
if err != nil {
println(err.Error())
return
}
config = configuration
certManager := &autocert.Manager{
Prompt: autocert.AcceptTOS,
HostPolicy: autocert.HostWhitelist(config.HostsPolicy...),
Expand Down

0 comments on commit 5f92171

Please sign in to comment.