Skip to content

Commit 5f92171

Browse files
committed
first release
1 parent c8d2f8d commit 5f92171

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmd/https/server.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
var (
14-
config, _ = https.LoadConfiguration()
14+
config *https.Configuration
1515
responseTimeout = time.Second
1616
)
1717

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

2727
func main() {
28+
configuration, err := https.LoadConfiguration()
29+
if err != nil {
30+
println(err.Error())
31+
return
32+
}
33+
config = configuration
2834
certManager := &autocert.Manager{
2935
Prompt: autocert.AcceptTOS,
3036
HostPolicy: autocert.HostWhitelist(config.HostsPolicy...),

0 commit comments

Comments
 (0)