mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 11:47:36 +08:00
[ADD] Add entrance plugin HTTPS support and certificate configuration
This commit is contained in:
parent
11c9eee3be
commit
5537611b59
@ -462,14 +462,14 @@ func (n *nginxAPI) addDomain(ads *AddDomainS) bool {
|
||||
if !bytes.HasPrefix([]byte(ads.Domain), []byte(fmt.Sprintf("%s.%s", p.Port, p.Servicename))) {
|
||||
if ads.HTTPS && ads.CertificateName != "" {
|
||||
httpsInfo := bytes.NewBuffer(nil)
|
||||
httpsInfo.WriteString(`https=true`)
|
||||
httpsInfo.WriteString(`https=https`)
|
||||
httpsInfo.WriteString(fmt.Sprintf(`&cert_name=%s&`, ads.CertificateName))
|
||||
httpsInfo.WriteString(string(upstream))
|
||||
logrus.Debugf("https info is %v", string(httpsInfo.Bytes()))
|
||||
pha.UpStream = httpsInfo.Bytes()
|
||||
} else if ads.TransferHTTP && ads.CertificateName != "" {
|
||||
httpsInfo := bytes.NewBuffer(nil)
|
||||
httpsInfo.WriteString(`tran_https=true`)
|
||||
httpsInfo.WriteString(`https=tran_https`)
|
||||
httpsInfo.WriteString(fmt.Sprintf(`&cert_name=%s&`, ads.CertificateName))
|
||||
httpsInfo.WriteString(string(upstream))
|
||||
logrus.Debugf("trans https info is %v", string(httpsInfo.Bytes()))
|
||||
|
Loading…
Reference in New Issue
Block a user