This is a problem with a recent change to web socket processing in Mattermost. Specifically, https://github.com/mattermost/platform/commit/1a9891f0f5671551d28be54a99155b907480cc5c
Try reverting the change to CheckOrigin. This really should mimic what is being done for HTTP connections in the server.go file (see ServeHTTP where there is the check for Origin header).
We had the same problem recently and reverting this change fixed our web socket issues.