MM-15494 Adding warning log when someone has configured a Mattermost push proxy with HTTP endpoint (#10869)
* MM-15494 Adding warning log when someone has configured a Mattermost push proxy with HTTP endpoint * MM-15494 go fmt check * MM-15494 Making function private * MM-15494 Updating warning message
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9652b49569
Коммит
713cf1ec36
@@ -216,6 +216,8 @@ func NewServer(options ...Option) (*Server, error) {
|
|||||||
mlog.Info(fmt.Sprintf("Current working directory is %v", pwd))
|
mlog.Info(fmt.Sprintf("Current working directory is %v", pwd))
|
||||||
mlog.Info("Loaded config", mlog.String("source", s.configStore.String()))
|
mlog.Info("Loaded config", mlog.String("source", s.configStore.String()))
|
||||||
|
|
||||||
|
s.checkPushNotificationServerUrl()
|
||||||
|
|
||||||
license := s.License()
|
license := s.License()
|
||||||
|
|
||||||
if license == nil && len(s.Config().SqlSettings.DataSourceReplicas) > 1 {
|
if license == nil && len(s.Config().SqlSettings.DataSourceReplicas) > 1 {
|
||||||
@@ -620,6 +622,13 @@ func (a *App) OriginChecker() func(*http.Request) bool {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Server) checkPushNotificationServerUrl() {
|
||||||
|
notificationServer := *s.Config().EmailSettings.PushNotificationServer
|
||||||
|
if strings.HasPrefix(notificationServer, "http://") == true {
|
||||||
|
mlog.Warn("Your push notification server is configured with HTTP. For improved security, update to HTTPS in your configuration.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func runSecurityJob(s *Server) {
|
func runSecurityJob(s *Server) {
|
||||||
doSecurity(s)
|
doSecurity(s)
|
||||||
model.CreateRecurringTask("Security", func() {
|
model.CreateRecurringTask("Security", func() {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user