Thanks for your help.
I update our Mattermost to 3.8.2 and use browser client
but got same error message.
[2017/04/22 15:20:32 CST] [EROR] websocket connect err: websocket: origin not allowed
[2017/04/22 15:20:32 CST] [EROR] /api/v3/users/websocket:connect code=500 rid=88ybn74wqib9mj5c6joixicjze uid=k84pboggc7f5fd944ry35cugky ip=36.225.139.27 Failed to upgrade websocket connection [details: ]