Skip to content

Commit

Permalink
don't use blacklisted headers on the client
Browse files Browse the repository at this point in the history
  • Loading branch information
CattoGamer committed Aug 28, 2024
1 parent 948457a commit 0740904
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ end
local HttpHeaders = {
["Cache-Control"] = "no-cache",
-- ["Connection"] = "keep-alive",
["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.7.8254.20 Safari/537.36"
}

function SERVICE:Fetch( url, onReceive, onFailure, headers )

if SERVER then
HttpHeaders["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.7.8254.20 Safari/537.36"
end

local request = {
url = url,
method = "GET",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,7 @@ do
print("[Invidious API]: " .. message)
end

http.Fetch("https://api.invidious.io/instances.json?sort_by=type,users", onSuccess, onFailure, {
["Accept-Encoding"] = "gzip, deflate",
["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36",
})
http.Fetch("https://api.invidious.io/instances.json?sort_by=type,users", onSuccess, onFailure, {})
end
fetchInstances()

Expand Down

0 comments on commit 0740904

Please sign in to comment.