Skip to content

Commit

Permalink
feat: 🎸 cache busting
Browse files Browse the repository at this point in the history
added cache busting headers to all request to prevent fetching of stale
data and bundles
  • Loading branch information
kajetan-kazimierczak committed Mar 22, 2021
1 parent cc66654 commit 5ce4ddd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export default function wrap(fetch: Fetch, options: FetcherOptions = {}): Fetche
...init,
headers: {
...init.headers,
Pragma: 'no-cache',
'Cache-Control': 'no-cache, no-store',
// eslint-disable-next-line max-len
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36',
},
Expand Down

0 comments on commit 5ce4ddd

Please sign in to comment.