What's the net::ERR_HTTP2_PROTOCOL_ERROR about?

前端 未结 22 2692
無奈伤痛
無奈伤痛 2020-12-01 02:24

I\'m currently working on a website, which triggers a net::ERR_HTTP2_PROTOCOL_ERROR 200 error on Google Chrome. I\'m not sure exactly what can provoke this erro

22条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-01 03:05

    I am finally able to solve this error after researching some things I thought is causing the error for 24 errors. I visited all the pages across the web. And I am happy to say that I have found the solution. If you are using NGINX, then set gzip to off and add proxy_max_temp_file_size 0; in the server block like I have shown below.

     server {
      ...
      ...
      gzip off;
      proxy_max_temp_file_size 0;
      location / {
        proxy_pass http://127.0.0.1:3000/;
      ....
    

    Why? Because what actually happening was all the contents were being compressed twice and we don't want that, right?!

提交回复
热议问题