Skip to content
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

Fix "age" header check in XHR loader #3763

Merged
merged 1 commit into from Apr 13, 2021
Merged

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Apr 12, 2021

This PR will...

Use RegEx to match "age" header in XMLHttpRequest.getAllResponseHeaders(), skipping the CDN Tune-In "age" header check in live streams with no "age" in the playlist response header.

Why is this Pull Request needed?

Fixes regression introduced in #3685 in response to #3680 that turns up the Refused to get unsafe header "age"' errors "to 11".

The solution that used getAllResponseHeaders().indexOf('age') matched the word "age" anywhere in the headers as in "max-age" as part of:

cache-control: max-age=2
content-length: 283
content-type: application/vnd.apple.mpegurl
date: Mon, 12 Apr 2021 20:39:28 GMT
expires: Mon, 12 Apr 2021 20:39:30 GMT
last-modified: Mon, 12 Apr 2021 20:39:28 GMT

Resolves issues:

Resolves #3680

Checklist

  • changes have been done against master branch, and PR does not conflict

@robwalch robwalch added this to the 1.0.1 milestone Apr 12, 2021
@robwalch robwalch added this to Top priorities in Release Planning and Backlog via automation Apr 12, 2021
Fixes regression introduced in #3685 in response to #3680
Resolves #3680
@robwalch robwalch merged commit 92bca82 into master Apr 13, 2021
@robwalch robwalch deleted the bugfix/age-header-regex branch April 13, 2021 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Release Planning and Backlog
  
Top priorities
Development

Successfully merging this pull request may close these issues.

Refused to get unsafe header "age" error in Chrome dev tools console
1 participant