我正在使用 nginx 版本 1.10.3 向浏览器提供文件。在我的服务器日志中,我看到了 304 响应的响应正文。如何避免这种情况?
Nginx 日志:
"GET /test/testfile.js HTTP/1.1" 304 2476 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
因此,响应包含 chrome 中的 nginx 标头信息,这很奇怪。
{"testconf": "{"testfield":"1","testfield2":"2"}"}HTTP/1.1
304 Not Modified
Server: nginx
Date: Sun, 15 Sep 2018 00:10:27 GMT
Last-Modified: Fri, 31 Aug 2018 00:49:38 GMT
Connection: keep-alive
ETag: "4b1190a2-1b642"
Last-Modified: Fri, 31 Aug 2018 00:49:38 GMT
Connection: keep-alive
Server: Test
X-Frame-Options: SAMEORIGIN
Cache-Control: public, max-age=0
{"testBooleanName":"true", "testLabelName":"label"}