impress-2020/src/server/lib
Matchu b73e2e1123 Send cache-control header for max-age=0, private
Some queries, like on `/your-outfits`, had the cache hint `max-age=0, private` set. In this case, our cache code sent no cache header, on the assumption that no header would result in no caching.

This was true on Vercel, but isn't true on our new Fastly setup! (Which makes sense, Vercel was a bit more aggressive here I think.)

This was causing an arbitrary user's data to be cached by Fastly as the result for `/your-outfits`. (We found this bug before launching the Fastly cache though, don't worry! No actual user data leaked!)

Now, as of this change, the `/your-outfits` query correctly sends a header of `Cache-Control: max-age=0, private`. This directs Fastly not to cache the result.

To fix this, we made a change to our HTTP header code, which is forked from Apollo's stuff.
2021-11-16 12:34:11 -08:00
..
apollo-cache-control-fork.ts Send cache-control header for max-age=0, private 2021-11-16 12:34:11 -08:00
apollo-server-vercel.js Use ES module syntax in backend instead of require 2021-02-02 22:26:55 -08:00
beeline-graphql.js Apply sampling rates to Honeycomb events 2021-05-26 18:50:19 -07:00