0

In Express you can app.disable('etag') is there anything similar in Caddy?

I have tried :

header {
\-Etag
\-Last-Modifier
Cache-Control no-store
} 

that makes Caddy not send the ETag header and it also makes browsers not send the If-None-Match: <ETagvalue> header.

But if I use curl directly to send the If-None-Match then Caddy will send 304


curl -v -H 'If-None-Match: "rl98mytb"' https://localhost.rubenlaguna.com

> GET / HTTP/2
> Host: localhost.rubenlaguna.com
> user-agent: curl/7.84.0
> accept: */*
> if-none-match: "rl98mytb"

* Connection state changed (MAX_CONCURRENT_STREAMS == 250)!
  \< HTTP/2 304
  \< alt-svc: h3=":443"; ma=2592000
  \< etag: "rl98mytb"
  \< server: Caddy
  \< date: Sun, 13 Nov 2022 17:08:17 GMT

My question is it possible to instruct Caddy to ignore If-None-Match and always return the 200 OK with the actual contents?

RubenLaguna
  • 21,435
  • 13
  • 113
  • 151

0 Answers0