Skip to content

Commit

Permalink
fix: Need for Speed: make EC keys the default (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
rentallect authored Jul 21, 2022
1 parent bd9823b commit 0523375
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
]
},
"dependencies": {
"@openziti/ziti-browzer-core": "^0.16.2",
"@openziti/ziti-browzer-core": "^0.16.4",
"async-mutex": "^0.3.2",
"cheerio": "^1.0.0-rc.12",
"jwt-decode": "^3.1.2",
Expand All @@ -93,4 +93,4 @@
"workbox-expiration": "^6.5.3",
"workbox-strategies": "^6.5.3"
}
}
}
4 changes: 3 additions & 1 deletion src/ZitiFirstStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var regexJPG = new RegExp( /^.*\.jpg$/, 'i' );
var regexSVG = new RegExp( /^.*\.svg$/, 'i' );
var regexControllerAPI: any;

var MAX_ZITI_FETCH_COUNT = 1; // aka the maximum number of concurrent Ziti Network Requests (TEMP)
var MAX_ZITI_FETCH_COUNT = 10; // aka the maximum number of concurrent Ziti Network Requests (TEMP)

/**
* An initial (stub) implementation of a
Expand Down Expand Up @@ -176,6 +176,8 @@ class ZitiFirstStrategy extends CacheFirst /* NetworkFirst */ {
});
this.logger.trace(`_initialize: ZitiContext created`);
this._zitiBrowzerServiceWorkerGlobalScope._zitiContext = this._zitiContext;

this._zitiContext.setKeyTypeEC();

await this._zitiContext.initialize({
loadWASM: true // unlike the ZBR, here in the ZBSW, we always instantiate the internal WebAssembly
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -969,10 +969,10 @@
"@types/emscripten" "^1.39.6"
"@wasmer/wasi" "^1.0.2"

"@openziti/ziti-browzer-core@^0.16.2":
version "0.16.2"
resolved "https://registry.yarnpkg.com/@openziti/ziti-browzer-core/-/ziti-browzer-core-0.16.2.tgz#349cee32c88f5adf344f4176c58941c8c326384c"
integrity sha512-UT3A14VaOH88LvjZOv24pAN0L8YelODHtISQjaIZ1/3nKeNUyem+1mwFpxD44oR0L1PmSKGfQzTpbBTCXlef2A==
"@openziti/ziti-browzer-core@^0.16.4":
version "0.16.4"
resolved "https://registry.yarnpkg.com/@openziti/ziti-browzer-core/-/ziti-browzer-core-0.16.4.tgz#c92a241edbb16a2c50cf2cf96a9a6516d55abb3d"
integrity sha512-saGXuqea1KERDYOlpjZH/xRuCMyReS6rn/3+z+F6c27hy6qSutD9isC+eQ/wt90ELBIh2DEra/5B7n70yKil4w==
dependencies:
"@openziti/libcrypto-js" "^0.9.0"
"@openziti/ziti-browzer-edge-client" "^0.2.0"
Expand Down

0 comments on commit 0523375

Please sign in to comment.