-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
304 responses changes expire time of resource #230
Comments
Indeed. Good catch @markwoon! -> GET http://server.localhost/test.json
<- HTTP/1.1 200 OK
Server: nginx
Date: Tue, 14 May 2019 22:24:23 GMT
Content-Type: application/json; charset=utf-8
Last-Modified: Sat, 09 Mar 2019 11:21:52 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
ETag: W/"5c83a1d0-117"
Expires: Tue, 14 May 2019 22:24:23 GMT
Cache-Control: max-age=0
X-Content-Type-Options: nosniff
-> GET http://server.localhost/test.json
If-None-Match: W/"5c83a1d0-117"
<- HTTP/1.1 304 Not Modified
Server: nginx
Date: Tue, 14 May 2019 22:25:06 GMT
Last-Modified: Sat, 09 Mar 2019 11:21:52 GMT
Connection: keep-alive
ETag: "5c83a1d0-117"
Expires: Thu, 13 Jun 2019 22:25:06 GMT
Cache-Control: max-age=2592000
X-Content-Type-Options: nosniff Sending a
But the miss of
Looking for a solution, any suggestion is welcomed. |
One solution is to add an empty condition to the map $sent_http_content_type $expires {
default 1M;
"" off; # <--
...
} -> GET http://server.localhost/test.json
If-None-Match: W/"5c83a1d0-117"
<- HTTP/1.1 304 Not Modified
Server: nginx
Date: Wed, 15 May 2019 00:16:42 GMT
Last-Modified: Sat, 09 Mar 2019 11:21:52 GMT
Connection: keep-alive
ETag: "5c83a1d0-117"
X-Content-Type-Options: nosniff But we lose |
@markwoon Does it solve the issue without any drawback on your side? |
That works for me. I don't think there's much else we can do here. I think my bigger issue is that there's no way to add "must-revalidate" when using |
@markwoon Thanks.
Did you try to add |
Oops, my bad. I got bit by how |
Problem:
The text was updated successfully, but these errors were encountered: