videojs / videojs-contrib-eme

Supports Encrypted Media Extensions for playback of encrypted content in Video.js
Other
200 stars 71 forks source link

fix: headers should be case-insensitive #217

Open victordidenko opened 4 months ago

victordidenko commented 4 months ago

From the README:

player.eme({
  emeHeaders: {

    // Remove the internal default Content-Type
    'Content-Type': null,
    'Custom-Foo': '<CUSTOM_FOO_VALUE>'
  }
});

But removing Content-Type header is not working this way, because headers are treated case sensitively.

This PR fixes this behavior, by lower casing all headers.