我使用cloudflare后 100% 出现net::ERR_HTTP2_PROTOCOL_ERROR 200

我使用cloudflare后 100% 出现net::ERR_HTTP2_PROTOCOL_ERROR 200

他是什么功能引起如何关闭它进行解决?

hosts访问源站服务器,他是非常正常的

并且这个问题只在Chrome上出现,使用IE浏览器是正常的。

translate
Net :: ERR_HTTP2_PROTOCOL_ERROR 200 appears 100% after I use cloudflare

What function does it cause how to solve it by closing it?

hosts access the origin server, it is very normal

And this problem only appears on Chrome, using Internet Explorer is normal.

@eva2000 helped me fix this once. For me, I had two HSTS headers. One on the server, and one at Cloudflare. Bad with Chrome. OK with Firefox.

What is the URL?

IIRC was actually you had incorrect nginx vhost syntax for HSTS that spanned a line break which some browsers didn’t like.

If you have access to a linux system with new enough curl version 7.50+ you can check your site’s headers for clues

curl -Ikv --http2 https://yourdomain.com

For instance @sdayman error was with HSTS syntax in his nginx vhost config file

curl 7.68 header check revealed

> user-agent: curl/7.68.0-DEV
> accept: */*
> 
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
* http2 error: Invalid HTTP header field was received: frame type: 1, stream: 1, name: [    includesubdomains; preload;], value: []
* HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
* stopped the pause stream!
* Connection #0 to host domain.com left intact
curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)

specifically related to HSTS preload header syntax

http2 error: Invalid HTTP header field was received: frame type: 1, stream: 1, name: [ includesubdomains; preload;], value: