mirror of
https://github.com/supanadit/geo-smart-system.git
synced 2024-11-21 16:16:22 +00:00
Change AutoTLS
This commit is contained in:
parent
5ddfc92f0c
commit
19cf1f4ad7
10
main.go
10
main.go
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user