Sunday 11 June 2017

Express answering 304 after proxying with nginx

I am trying to understand the issue here. The situation is: I have nginx server running with this config:

worker_processes  1;

events {

}

http {
        server {
                location /admin/ {
                        proxy_pass http://localhost:3000/;
                }
        }
}

and I have node/expressjs server running on the same host, the app is just a standard template generated by express, unmodified with only one exception: /views/layout.pug

from:

link(rel='stylesheet', href='/admin/stylesheets/style.css')

to:

link(rel='stylesheet', href='/admin/stylesheets/style.css')

The issue is I am getting 304 response codes when accessing the server:

GET / 304 2945.513 ms - -
GET /stylesheets/style.css 304 17.532 ms - -

Also I am kind of worried about the response time for '/'



via ProNOOB

No comments:

Post a Comment