We have the page which has some of the larger Javascript files. When we hit the page, all the small files get downloaded. However, one of the large files was not downloaded fully and failed with net::ERR_HTTP2_PROTOCOL_ERROR most of the time. We need to open the page using only a VPN connection as it does not open to all.
Just to add, the Nginx ingress controller is used with the following settings for that ingress:
nginx.ingress.kubernetes.io/configuration-snippet: |
gzip on;
gzip_types text/plain text/css image/png application/javascript;
if ($request_uri ~* .(js|css|gif|jpeg|png)) {
expires 1M;
add_header Cache-Control "public";
}
nginx.ingress.kubernetes.io/http2-push-preload: "false"
nginx.ingress.kubernetes.io/proxy-body-size: 500M
nginx.ingress.kubernetes.io/proxy-bufferings: "off"
nginx.ingress.kubernetes.io/proxy-connect-timeout: "36000"
nginx.ingress.kubernetes.io/proxy-max-temp-file-size: "0"
nginx.ingress.kubernetes.io/proxy-read-timeout: "36000"
nginx.ingress.kubernetes.io/proxy-send-timeout: "36000"
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
Can we set another annotation in the Nginx ingress or this might be an issue from VPN? I wonder how can we resolve this issue.
2
Answers
I solved this by changing the configuration for the Nginx Ingress as following:
Glad if this is time-saving for anyone.
As @DevOps answered this needs to be configured for nginx. The nginx kubernetes ingress has the option to be configured via a configmap where it supports many options.
Here is an example for kubectl
Or with terraform