fix: add missing check for c.youtube.com host

This commit is contained in:
Fijxu 2025-03-10 13:48:28 -03:00
parent adcdb8cb92
commit a338d5df88
No known key found for this signature in database
GPG Key ID: 32C1DDF333EDA6A4

View File

@ -21,7 +21,7 @@ module Invidious::Routes::VideoPlayback
end
# Sanity check, to avoid being used as an open proxy
if !host.matches?(/[\w-]+.googlevideo.com/)
if !host.matches?(/[\w-]+.googlevideo.com/) && !host.matches?(/[\w-]+.c.youtube.com/)
return error_template(400, "Invalid \"host\" parameter.")
end