Skip to content

Commit

Permalink
$mol_offline: skip dynamic requests
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Jan 9, 2024
1 parent 697e74f commit 12c5c83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions offline/offline.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ namespace $ {
)
}

if( request.method !== 'GET' || !/^https?:/.test( request.url ) ) {
return event.respondWith( fetch( request ) )
}
if( request.method !== 'GET' ) return
if( !/^https?:/.test( request.url ) ) return
if( /\?/.test( request.url ) ) return

const fresh = fetch( event.request ).then( response => {

Expand Down

0 comments on commit 12c5c83

Please sign in to comment.