G
G
grabbee2022-03-18 17:47:34
Nginx
grabbee, 2022-03-18 17:47:34

Why is NGINX proxy ignoring Expires?

Backend returns
HTTP/1.1 200 OK

Server: nginx
Content-Type: image/jpeg
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: public
Date: Fri, 18 Mar 2022 14:14:25 GMT
Expires: Sun, 17 Apr 2022 14:14:25 GMT


And after the proxy
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 18 Mar 2022 14:15:30 GMT
Content-Type: image/jpeg
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: public
pragma: no-cache
expires: -1
X-Cache: EXPIRED


And the cache itself works. And add_header X-Cache $upstream_cache_status; into the headlines.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question