implement PLT-6469 - Send HELO request containing domain name to SMTP server (#6322)
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
622998add1
Коммит
0df61d161f
@@ -6,6 +6,7 @@ package utils
|
||||
import (
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
|
||||
"github.com/mattermost/platform/model"
|
||||
@@ -66,3 +67,11 @@ func GetIpAddress(r *http.Request) string {
|
||||
|
||||
return address
|
||||
}
|
||||
|
||||
func GetSiteName(siteURL string) string {
|
||||
u, err := url.Parse(siteURL)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return u.Host
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user