Skip to content

Commit

Permalink
Set a few more headers for local API requests (#5339)
Browse files Browse the repository at this point in the history
  • Loading branch information
absidue authored Jun 26, 2024
1 parent 925e2c7 commit fcee43c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,8 @@ function runApp() {

if (url.startsWith('https://www.youtube.com/youtubei/')) {
requestHeaders['Sec-Fetch-Site'] = 'same-origin'
requestHeaders['Sec-Fetch-Mode'] = 'same-origin'
requestHeaders['X-Youtube-Bootstrap-Logged-In'] = 'false'
} else {
// YouTube doesn't send the Content-Type header for the media requests, so we shouldn't either
delete requestHeaders['Content-Type']
Expand Down

0 comments on commit fcee43c

Please sign in to comment.