Skip to content

Commit 0a6b6ad

Browse files
committed
Prevent IE to cache requests/responses
Summary: https://bitgoinc.atlassian.net/browse/BG-914 There is an issue with IE where you login/logout and try to login again and in the OTP screen throws an error, this is due to IE caching the requests/responses. We need this special If-Modified-Since attribute in the header with a very old date so IE don't to that This was causing the sdk to throw invalid hmac, because it was using an older HMAC for a new request, and thus throwing the error in the client. Reviewers: arik Reviewed By: arik Subscribers: ben Differential Revision: https://phabricator.bitgo.com/D6035
1 parent b06d2ed commit 0a6b6ad

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bitgo",
3-
"version": "3.4.8",
3+
"version": "3.4.9",
44
"description": "BitGo Javascript SDK",
55
"main": "./src/index.js",
66
"keywords": [

src/bitgo.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ var BitGo = function(params) {
258258
}
259259

260260
this.set('BitGo-Auth-Version', '2.0');
261+
// prevent IE from caching requests
262+
this.set('If-Modified-Since', 'Mon, 26 Jul 1997 05:00:00 GMT');
261263
if (bitgo._token) {
262264

263265
// do a localized data serialization process

0 commit comments

Comments
 (0)