Fix HTTP2 Header Errors on Nginx Reverse Proxy
You might get an HTTP2 error from curl and Safari browsers even though the page loads fine on Chrome and Firefox.
curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
Safari Can't Open the Page Safari can't open the page "https://steve.zazeski.com/". The error is: "cannot parse response" (NSURLErrorDomain:-1017)
The issue is the backing service is offering to upgrade an HTTP1 connection but the reverse proxy is using an HTTP2 connection to the actual client. If either the backing service does not offer to upgrade the connection or the proxy removes this header, then this error will go away.
If you use Nginx reverse proxy manager, in the edit proxy host dialog you can add
proxy_hide_header Upgrade;
If you are running standard Nginx:
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_hide_header Upgrade;
}
}
openanalytics 46453 views
Technology
Next Post
Dot New Urls That I Wish I Knew About Sooner
Art