-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
If a response contains ETag and Cache-Control with no-cache, caddy ignores no-cache and serves cached response with default ttl without validation.
Reproduction steps:
{
log
cache
}
http://localhost:80 {
log
cache
reverse_proxy http://localhost:81
}
http://localhost:81 {
log
header ETag "\"3e25960a79dbc69b674cd4ec67a72c62\""
header Cache-Control "no-cache"
respond "Hello world"
}$ curl -i localhost:80
HTTP/1.1 200 OK
Cache-Control: no-cache
Cache-Status: Souin; fwd=uri-miss; stored; key=GET-http-localhost-/
....
$ curl -i localhost:80
HTTP/1.1 200 OK
Age: 11
Cache-Control: no-cache
Cache-Status: Souin; hit; ttl=109; key=GET-http-localhost-/; detail=DEFAULT
...caddy version
v2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8=Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels