给定一个带有express的nodejs应用程序,它通过nginx。我正在尝试使用etags添加缓存支持。
如果没有nginx,如果直接调用应用程序就行了。我设置了If-None-Match标头并收到304.
使用nginx时,响应始终为200.
我的Nginx配置:
location /app/ {
proxy_pass http://app;
}
快递记录条目。
info:HTTP GET / app / statusCode = 200,url = / app /,connection = upgrade, host = 11.1.1.1,accept = application / json,text / plain, / , user-agent = Mozilla / 5.0(Windows NT 6.1; WOW64)AppleWebKit / 537.36 (KHTML,像Gecko一样)Chrome / 56.0.2924.87 Safari / 537.36, referer = somesite.com,accept-language = en-US,en; q = 0.8,de; q = 0.6,
如果 - 无匹配= W / “29ae92-4sHBxs6sPcMB3 / GypUtubLN0HQ8-gzip的”, x-forwarded-proto = http,cookie = io = XAMR4ZH1TzxIvWzkAAAA, x-forwarded-for = 10.43.212.26,x-forwarded-host = somesite.com, x-forwarded-server = somesite.com,method = GET,httpVersion = 1.1, originalUrl = / app /,responseTime = 352