-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add support for defining custom headers for default license and certificate requests. #76
feat: Add support for defining custom headers for default license and certificate requests. #76
Conversation
I think |
@gkatsev Yeah it is definitely too generic. I left it as such until we can establish the following: should we allow headers to be set only on license requests? Or also certificate and key requests? |
I think we ought to allow custom headers for any of the default requests contrib-eme can make. |
6a2ccee
to
3344b20
Compare
…ySystems to override values from options.
headers
emeOption (WIP)const defaultGetLicense = (url) => (emeOptions, keyMessage, callback) => { | ||
const defaultGetLicense = (keySystemOptions) => (emeOptions, keyMessage, callback) => { | ||
const headers = videojs.mergeOptions( | ||
{'Content-type': 'application/octet-stream'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're now providing options to add headers, any chance you could not include this by default? For whatever reason, our DRM provider doesn't have Content-Type
in the Access-Control-Allow-Headers
header, so I provide a custom function just so this header isn't there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think there would be issues in removing it? I've got no major objections unless removing it may break someone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we allowed removing headers by setting them to null
or something, so you could do:
licenseHeaders: {
'Content-Type': null
}
I am hesitant to remove defaults because it could easily break someone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test updates look good to me!
No description provided.