filecoin-saturn / L1-node

Filecoin Saturn L1 Node • The edge cache layer of Filecoin's decentralized CDN 🪐
Other
143 stars 49 forks source link

Don't cache server-timing's #348

Closed willscott closed 1 year ago

willscott commented 1 year ago

on cache responses, the server-timing headers from the initial fetch shouldn't be returned again - those timings aren't accurate for the cached response

DiegoRBaquero commented 1 year ago

I looked into this, but the headers are part of the cache and returned as-is. There's no way to condition the caching of headers :(

willscott commented 1 year ago

we have some logic for the 'is cache hit' header - can that also strip off server timing headers on the response at that point?

On Thu, Apr 27, 2023 at 4:44 PM Diego Rodríguez Baquero < @.***> wrote:

I looked into this, but the headers are part of the cache and returned as-is. There's no way to condition the caching of headers :(

— Reply to this email directly, view it on GitHub https://github.com/filecoin-saturn/L1-node/issues/348#issuecomment-1526018480, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIRJ3KLV4VXTIEAJ7D253XDKO55ANCNFSM6AAAAAAXOAXMPY . You are receiving this because you authored the thread.Message ID: @.***>

DiegoRBaquero commented 1 year ago

I already tried using proxy_hide_header conditionally, but nginx doesn't allow it in that scope (if):

nginx: [emerg] "proxy_hide_header" directive is not allowed here in /etc/nginx/conf.d/shared.conf:80

But even if it did work, I don't think it would apply to to cached responses, because the directive is to remove headers from the upstream response.

willscott commented 1 year ago

cool. i think i'll close for now as 'not worth it'