Websocket error in Docker mattermost

hi everyone.

I would be really happy to receive the feedback about my issue. I am very new in sysadmin stuff also.

I spent a lot of time in order to establish Mattermost but every time some problems happen.

I have installed mattermost via Docker according to the tutorial on the website.

However, I have a Websocket issue.

In JS console:

[Error] WebSocket connection to ‘ws://IPADRESS/api/v4/websocket?connection_id=&sequence_number=0’ failed: There was a bad response from the server.

If I open docker logs I see that the connection seems to be successful.

{“timestamp”:“2024-07-03 14:50:25.456 Z”,“level”:“debug”,“msg”:“Received HTTP request”,“caller”:“web/handlers.go:163”,“method”:“GET”,“url”:“/api/v4/system/ping”,“request_id”:“84etngaocj8nighiwosypnbsfh”,“status_code”:“200”}

What am I missing? I have also modified config.json file with AllowCors ‘*’ parameter.