Add flag to force TLS

This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-09-15 17:49:36 -03:00
parent e9e20a5e79
commit 23d0d8e8d0
2 changed files with 8 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import (
"net"
"time"
"github.com/play-with-docker/play-with-docker/config"
"github.com/play-with-docker/play-with-docker/event"
"github.com/play-with-docker/play-with-docker/pwd/types"
)
@@ -113,6 +114,11 @@ func (p *pwd) InstanceNew(session *types.Session, conf types.InstanceConfig) (*t
if err != nil {
return nil, err
}
if config.ForceTLS {
conf.Tls = true
}
instance, err := prov.InstanceNew(session, conf)
if err != nil {
log.Println(err)