[Cashtab] Prevent caching of index.html
Summary:
T2459
Prevent caching of index.html
This ensures that web app users will always get the most recent version of the app. The JS bundle changes file name with each deployment, so loading the latest index.html will also load the latest js bundle.
Test Plan:
cd web/cashtab docker build -t cashtab_local . docker run --rm -p 8080:80 --name cashtab cashtab_local
In another terminal,
curl -I http://localhost:8080
Confirm output includes:
Cache-Control: max-age=0, no-cache, no-store, must-revalidate Pragma: no-cache
Navigate to localhost:8080 and inspect the Network tab in the developer console to get the filename of the js bundle (it probably will not be what I have below, since it changes with every build). Then,
curl -I http://localhost:8080/static/js/main.ca0925d3.js
Confirm output does not include the above cache statements (we want js files to be cached).
Reviewers: #bitcoin_abc, kieran709
Reviewed By: #bitcoin_abc, kieran709
Differential Revision: https://reviews.bitcoinabc.org/D11592