websocket 传输无法在 google 云应用引擎标准与 NestJS(仅 longpolling)上运行,在 flex 环境中工作

websocket transport not functioning on google cloud app engine standard with NestJS (only longpolling), does work in flex environment

我已经 运行 在 Google Cloud App Engine 服务中使用 NestJS API 大约 6 个月了,现在在 flex 环境中。我正在我的一个较低环境中测试托管在标准应用程序引擎服务环境中的服务,今天我注意到当我从 angular 前端建立 websocket 连接时,它只适用于长轮询传输。在我的 flex 环境中,websockets 传输工作正常。

我在 API 日志记录中没有看到任何错误,所以我猜测 GCP 上的标准环境有某种机制阻止 wss 流量连接到 websockets。

也有可能我的 API 只是没有注销针对该事件抛给 GCP 记录器的异常。

如果 API 有问题,我是否需要对 API 项目进行某种配置更改才能允许这样做?否则,在 GCP 中部署到标准环境时是否需要更改某些内容才能使其正常工作?

TIA

Websocket 仅在 Flexible 中受支持(请参阅部分 - 比较 Google 的 documentation 的高级功能)