Skip to content

Commit

Permalink
Merge pull request #27 from filecoin-saturn/feat/update-client
Browse files Browse the repository at this point in the history
feat: update saturn client v0.3.7
  • Loading branch information
AmeanAsad authored Dec 20, 2023
2 parents dcddc72 + 70205c5 commit ec2263a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"webpack-dev-server": "^4.7.4"
},
"dependencies": {
"@filecoin-saturn/js-client": "^0.3.6",
"@filecoin-saturn/js-client": "^0.3.7",
"@sentry/browser": "^7.69.0",
"browser-readablestream-to-it": "^1.0.3",
"debug": "^4.3.3",
Expand Down
9 changes: 7 additions & 2 deletions src/sw/interceptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@ export class Interceptor {
async start(controller) {
try {
const opts = {
customerFallbackURL: self.event.request.url
customerFallbackURL: self.event.request.url,
raceNodes: true,
firstHitDNS: true
}
const contentItr = await self.saturn.fetchContentWithFallback(self.cidPath, opts)
const contentItr = await self.saturn.fetchContentWithFallback(
self.cidPath,
opts
)
await self._streamContent(contentItr, controller)
} catch (err) {
self._debug('Error', err)
Expand Down

0 comments on commit ec2263a

Please sign in to comment.