Skip to content

Commit

Permalink
feat: update saturn client v0.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
AmeanAsad committed Dec 19, 2023
1 parent dcddc72 commit c5c4775
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
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 c5c4775

Please sign in to comment.