Skip to content

Commit

Permalink
fix: fix bzz redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
tomicvladan committed Sep 9, 2022
1 parent 24e678f commit e67c0aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/background/listener/bee-api.listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ export class BeeApiListener {
chrome.webRequest.onBeforeRequest.addListener(
(details: chrome.webRequest.WebRequestBodyDetails) => {
console.log('Original BZZ Url', details.url)
const urlParams = new URLSearchParams(details.url)
const query = urlParams.get('oq')
const urlParams = new URLSearchParams(new URL(details.url).search)
const query = decodeURI(urlParams.get('oq') || urlParams.get('q') || '')

if (!query || !query.startsWith('bzz://')) return

Expand Down

0 comments on commit e67c0aa

Please sign in to comment.