Change AutoTLS

This commit is contained in:
Supan Adit Pratama 2020-11-24 11:40:12 +07:00
parent 5ddfc92f0c
commit 19cf1f4ad7

10
main.go
View File

@ -6,8 +6,6 @@ import (
"github.com/gin-gonic/gin"
"github.com/go-redis/redis"
"github.com/supanadit/geo-smart-system/system"
"golang.org/x/crypto/acme/autocert"
"log"
)
func main() {
@ -21,11 +19,5 @@ func main() {
// Call Router
system.Router(r, client)
// Run Server
m := autocert.Manager{
Prompt: autocert.AcceptTOS,
HostPolicy: autocert.HostWhitelist(),
Cache: autocert.DirCache("/var/www/.cache"),
}
log.Fatal(autotls.RunWithManager(r, &m))
_ = autotls.Run(r, "api.geosmart.supanadit.com")
}