re-enable SSL
This commit is contained in:
parent
c53e7173aa
commit
2fcfd8100a
1 changed files with 6 additions and 1 deletions
|
@ -236,10 +236,15 @@ func main() {
|
||||||
http.Handle("/static/", static())
|
http.Handle("/static/", static())
|
||||||
http.Handle("/", r)
|
http.Handle("/", r)
|
||||||
|
|
||||||
|
if len(conf.server.cert) == 0 {
|
||||||
err = http.ListenAndServe(conf.server.addr, nil)
|
err = http.ListenAndServe(conf.server.addr, nil)
|
||||||
|
} else {
|
||||||
|
err = http.ListenAndServeTLS(conf.server.addr, conf.server.cert, conf.server.key, nil)
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Cannot start server: ", err)
|
log.Error("Cannot start server: ", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static is a helper function that will setup handlers
|
// static is a helper function that will setup handlers
|
||||||
|
|
Loading…
Reference in a new issue