What does ERR_SPDY_PROTOCOL_ERROR mean in nginx?

后端 未结 14 2277
无人共我
无人共我 2020-12-09 01:45

I and a few of my colleagues got the net::ERR_SPDY_PROTOCOL_ERROR error.

We use ngnix version 1.8.0. The error is not stable (hard to replicate), and t

相关标签:
14条回答
  • 2020-12-09 02:15

    Check the location of your proxy cache path - check it exists, has space, and that the permissions and owner allow the nginx process to write to the path.

    e.g. nginx.conf (snippet)

    proxy_cache_path /proxy_cache levels=1:2 keys_zone=danger_zone:10m inactive=60m;

    ... then check the /proxy_cache path is owned and writable by nginx.

    0 讨论(0)
  • 2020-12-09 02:15

    If you're getting

    ERR_HTTP2_PROTOCOL_ERROR

    OR

    ERR_SPDY_PROTOCOL_ERROR

    in Chrome or Safari browser by using Nginx Content-Security-Policy, first inspect this issue by accessing chrome hidden interface: chrome://net-internals/#events and selecting "live HTTP/2 sessions" button under HTTP/2 tab.

    If you get anything like below as a result against your domain after a refresh:

    HTTP2_SESSION_RECV_INVALID_HEADER

    --> error = "Invalid character in header name."

    You should write CSP header in following method:

    add_header Content-Security-Policy "<values>";
    

    This method worked fine for me.

    NOTE: White spaces are not allowed in CSP. Use white space to differentiate the policy parameter and its value only. To reproduce this issue in chrome, you can use add_header Content-Security-Policy: "<values>"; which have additional : which will consider as invalid.

    0 讨论(0)
提交回复
热议问题