Browse Source

Use case-insensitive match for http headers

tags/v0.1.0
Gerben 5 years ago
parent
commit
5e54b7207a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/audio-player/background.js

+ 1
- 1
app/audio-player/background.js View File

@@ -14,7 +14,7 @@ async function tryUntilItWorks(func, delayBetweenTries = 1, maxTries = 10) {


async function onHeadersReceived({ responseHeaders, url, tabId }) { async function onHeadersReceived({ responseHeaders, url, tabId }) {
const isAudio = responseHeaders.some(header => const isAudio = responseHeaders.some(header =>
header.name === 'Content-Type' && header.value.startsWith('audio/')
header.name.toLowerCase() === 'content-type' && header.value.toLowerCase().startsWith('audio/')
); );


if (isAudio) { if (isAudio) {


Loading…
Cancel
Save