Skip to content

Commit

Permalink
fix(cache): treat caches as private
Browse files Browse the repository at this point in the history
Not making this breaking because tbh it was kind of unexpected. Shared
caches are much less aggressive about caching, specially when it comes
to authenticated requests.

In the future, make-fetch-happen should allow this to be configurable,
but for now, caches should be considered private for server-side
purposes.
  • Loading branch information
zkat committed Apr 9, 2017
1 parent 36cdc1c commit 57b7dc2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ function makePolicy (req, res) {
status: res.status,
headers: adaptHeaders(res.headers)
}
return new CachePolicy(_req, _res)
return new CachePolicy(_req, _res, {
shared: false
})
}

// https://tools.ietf.org/html/rfc7234#section-4.2
Expand Down

0 comments on commit 57b7dc2

Please sign in to comment.