MyGit

v20.44.0

uNetworking/uWebSockets

版本发布时间: 2023-05-28 17:58:08

uNetworking/uWebSockets最新发布版本:v20.64.0(2024-07-04 03:06:24)

HTTP error pages

NGINX is a silly proxy. It's very common for users to report issues with NGINX, and it's easy to understand. If you set up NGINX as proxy for uWS, you will most likely get a spinning wheel followed by 502 Bad Gateway as if the uWS server is unreachable.

This is because NGINX defaults to the 27 year old, ancient, HTTP/1.0 when talking to backend servers. uWS naturally does not support this protocol, and is only fully standards compliant with the 26 years younger HTTP/1.1 RFC9112.

However, ideology aside, it would be nice if uWS played along with existing ecosystems. Now it does:

screencapture-localhost-9002-some-path-2023-05-28-11_37_12

This page is what you will see after setting up NGINX to proxy uWS. From this error it should hint of the proxy_http_version 1.1 config in NGINX. Once applied, the NGINX -> uWS combo will give you this:

screencapture-localhost-3000-2023-05-28-11_41_15

You can see and configure the error pages in src/HttpErrors.h. More errors will be added as they are needed. The default style is a minimal Apache-like page.

相关地址:原始地址 下载(tar) 下载(zip)

查看:2023-05-28发行的版本