Hello, I dunno if that's possible to return the header Content-Location with the resource location on GetCollection results.
Context:
In Souin/cache-handler caddy module we have the tag-based invalidation but we use the Content-Location HTTP response header to generate an associative array with the given format.
[Content-Location header value] => [{Generated cache key from the caddy module for req1}, {Generated cache key from the caddy module for req2}]
Actually I'm using a kind of hack in the Caddyfile to always have a Content-Location returned by the application with the following snippet:
vars initialRequest {uri}
header Content-Location {http.vars.initialRequest}
So it fixes the GetCollection Content-Location issue but generates an additional Content-Location value on GetItem. I know that caddy allows to defer the headers responses but if I use the defer, the middleware doesn't get this header.
Description
Hello, I dunno if that's possible to return the header
Content-Location
with the resource location on GetCollection results.Context: In Souin/cache-handler caddy module we have the tag-based invalidation but we use the
Content-Location
HTTP response header to generate an associative array with the given format.Example:
Actually I'm using a kind of hack in the Caddyfile to always have a
Content-Location
returned by the application with the following snippet:So it fixes the GetCollection Content-Location issue but generates an additional Content-Location value on GetItem. I know that caddy allows to defer the headers responses but if I use the defer, the middleware doesn't get this header.
Example