I have same problem,
there is my mattermost.log
[2017/04/21 14:46:36 CST] [EROR] websocket connect err: websocket: origin not allowed
[2017/04/21 14:46:36 CST] [EROR] /api/v3/users/websocket:connect code=500 rid=gj88f7qtu3yd3m5kdebw11ot9w uid=rhynu9jrebr1zcgpo4t1gwag8w ip=172.16.2.254 Failed to upgrade websocket connection [details: ]