Answer the question
In order to leave comments, you need to log in
Provisional headers are shown (nginx proxy backend) how to fix?
Hi all!
I have a nodejs application that hangs on port 3000. Nginx hangs on port 80, which proxies a request to nodejs app. At the same time, proxying should be as transparent as possible, i.e. node, the application must receive the original client request with headers.
With this approach, I get some unpleasant result. The site is loading long and besides, I see a warning in the chrome console " provisional headers are shown ". Googling didn't work, please help
upstream backend {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name www.mydomain.com;
return 301 $scheme://mydomain.com$request_uri;
}
server {
listen 80;
server_name mydomain.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://backend;
proxy_redirect off;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question