I am trying to implement http2_push
using nginx
on windows 7. I followed steps mentioned in this article.
I'm running nginx 1.13.12
executable version. Have created & installed self signed certificates and it is working fine.
As mentioned in this answer, I checked and solved the certificate validation issue as well.
Still the files I want to push is not getting pushed into the browser. I am checking it through the network tab in inspector (Google Chrome - Screenshot attached).
nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 443 ssl http2;
server_name localhost;
ssl_certificate ssl/localhost.crt;
ssl_certificate_key ssl/localhost.key;
location = /test.html {
root html;
http2_push /stylepush.css;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
Output (Screenshot):
Can anyone help me out where I am going wrong? Thanks for the help in advance.