Websocket Connection Errors

I have installed Mattermost platform -which requires websocket feature- on Ubuntu 14.04 with nginx as reverse proxy as per Instructions Troubleshooting Mattermost Issues — Mattermost documentation are fulfilled properly. on the same machine and accessible through HTTPS with no issues.

Everything in my environment is behind Caddy Server acting as reverse proxy on different machine.

Now, access from outside the network is resulting in websocket errors as below shown,

Caddyfile for the above platform as below,

https://node.domain.com	{
						tls admin@domain.com
						proxy / https://xxx.xxx.xxx.xxx:PORT	{ transparent insecure_skip_verify }
						}

Please advise on the root causes of websocket error, is it mattermost of there’s something missing in caddy configurations?
Other platforms with websocket requirements are working properly with the above basic Caddyfile template.

Does adding the websocket preset to your proxy block have any effect?

https://caddyserver.com/docs/proxy#presets

@Whitestrake
Thanks for support, below is the modified Caddyfile works with Mattermost as reverse proxy for future records,

https://node.domain.com	{
						tls admin@domain.com
						proxy / https://xxx.xxx.xxx.xxx:PPPP	{ transparent insecure_skip_verify websocket }                                    
						}