简体   繁体   English

Zammad 社区 Livechat Websocket 连接无法通过 Synology 应用程序门户工作

[英]Zammad Community Livechat Websocket connection not working through Synology Application Portal

I have a VM on our LAN with Ubuntu 20.04 and Zammad Community installed and working.我在我们的 LAN 上有一个虚拟机,安装了 Ubuntu 20.04 和 Zammad 社区并正常工作。 We use Synology Application Portal (Reverse-Proxy using nginx) to access it from outside and this is working too.我们使用 Synology Application Portal(使用 nginx 的反向代理)从外部访问它,这也有效。

But a functionnality of Zammad is Livechat and uses Websockets to work and, that's the snag, Websockets doesn't work, Chat will not initialize on our main website (hosted outside).但是 Zammad 的一个功能是 Livechat 并使用 Websockets 来工作,这就是问题所在,Websockets 不起作用,Chat 不会在我们的主网站(托管在外部)上初始化。

Here is the error in javascript console on the website while loading the livechat:这是加载实时聊天时网站上javascript 控制台中的错误

Zammad Livechat Synology 应用程序门户 Websocket 问题

The solution is to enable Websocket communication on the Synology Application Portal entry by adding some custom headers.解决方案是通过添加一些自定义标头在 Synology 应用程序门户条目上启用 Websocket 通信。

  1. In the DSM, open the Control Panel under "Application Portal" tab在 DSM 中,打开“应用程序门户”选项卡下的控制面板

  2. Select the app you want to enable Websockets Select 要启用 Websockets 的应用程序

  3. Go to "Custom Headers" tab Go 到“自定义标题”选项卡

  4. Add theese two entries:添加这两个条目:

    "Upgrade" with value "$http_upgrade"值为“$http_upgrade”“升级

    "Connection" with value "$connection_upgrade"值为“$connection_upgrade”“连接”

Synology 应用程序门户 Websockets 通信规则

Note that, in last updates of DSM 6, a rule set has been prepared and is available under the Add button.请注意,在 DSM 6 的最后更新中,已准备好规则集,可在添加按钮下使用。 It will create rules for you.它将为您创建规则。

Synology Application Portal 启用 Websockets 通信

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM