mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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
This commit is contained in:
@@ -216,6 +216,8 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
mlog.Info(fmt.Sprintf("Current working directory is %v", pwd))
|
||||
mlog.Info("Loaded config", mlog.String("source", s.configStore.String()))
|
||||
|
||||
s.checkPushNotificationServerUrl()
|
||||
|
||||
license := s.License()
|
||||
|
||||
if license == nil && len(s.Config().SqlSettings.DataSourceReplicas) > 1 {
|
||||
@@ -620,6 +622,13 @@ func (a *App) OriginChecker() func(*http.Request) bool {
|
||||
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) {
|
||||
doSecurity(s)
|
||||
model.CreateRecurringTask("Security", func() {
|
||||
|
||||
Reference in New Issue
Block a user