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 trusted-replace-xhr-response — breakage on music.youtube.com #359

Closed
AdamWr opened this issue Sep 13, 2023 · 1 comment
Closed

Fix trusted-replace-xhr-response — breakage on music.youtube.com #359

AdamWr opened this issue Sep 13, 2023 · 1 comment

Comments

@AdamWr
Copy link
Member

AdamWr commented Sep 13, 2023

Related to - AdguardTeam/AdguardFilters#160538 (comment)
AdguardTeam/AdguardFilters#161495
When few trusted-replace-xhr-response are used then music.youtube.com does not work correctly (happens only when logged in).

Steps to reproduce:

  1. Add these rules:
youtube.com,youtubekids.com,youtube-nocookie.com#%#//scriptlet('trusted-replace-xhr-response', '/\"adSlots.*?\}\]\}\}\]\,/', '', '/player\?key=|watch\?v=/')
youtube.com,youtubekids.com,youtube-nocookie.com#%#//scriptlet('trusted-replace-xhr-response', '/\"playerAds.*?\}\}\]\,/', '', '/player\?key=|watch\?v=/')
  1. Go to - https://music.youtube.com/
  2. Sign in
  3. Try to listen music

Error occurs.

Screenshot

image

@AdamWr
Copy link
Member Author

AdamWr commented Sep 13, 2023

It looks like that the problem is caused by adding multiple times the same value to header which causes an error:

Bad request: multiple values in X-Origin header are not allowed.
Screenshots

image

image

@adguard-bot adguard-bot assigned slavaleleka and unassigned maximtop Sep 18, 2023
adguard pushed a commit that referenced this issue Sep 19, 2023
… to header multiple times. #359

Squashed commit of the following:

commit c07c76a
Merge: 13f14dc 9532f7c
Author: Adam Wróblewski <adam@adguard.com>
Date:   Tue Sep 19 07:21:14 2023 +0200

    Merge branch 'master' into fix/AG-25821

commit 13f14dc
Author: Adam Wróblewski <adam@adguard.com>
Date:   Mon Sep 18 19:24:18 2023 +0200

    Better fix for issue with header value

commit d051ce2
Author: Adam Wróblewski <adam@adguard.com>
Date:   Mon Sep 18 18:55:06 2023 +0200

    Fix trusted-replace-xhr-response - do not add the same value to header multiple times
@adguard-bot adguard-bot changed the title Fix 'trusted-replace-xhr-response' — breakage on music.youtube.com Fix trusted-replace-xhr-response — breakage on music.youtube.com Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants