mirror of
https://github.com/iv-org/invidious.git
synced 2025-06-28 09:38:31 +00:00
Merge branch 'iv-org:master' into master
This commit is contained in:
commit
2c390e76b1
@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
## vX.Y.0 (future)
|
## vX.Y.0 (future)
|
||||||
|
|
||||||
|
## v2.20250504.0
|
||||||
|
|
||||||
|
Small release with quick workaround fix for issue #4251 (Nil assertion failed).
|
||||||
|
|
||||||
|
PR: https://github.com/iv-org/invidious/issues/5263
|
||||||
|
|
||||||
## v2.20250314.0
|
## v2.20250314.0
|
||||||
|
|
||||||
### Wrap-up
|
### Wrap-up
|
||||||
|
@ -90,14 +90,14 @@ db:
|
|||||||
##
|
##
|
||||||
## API key for Invidious companion, used for securing the communication
|
## API key for Invidious companion, used for securing the communication
|
||||||
## between Invidious and Invidious companion.
|
## between Invidious and Invidious companion.
|
||||||
## The size of the key needs to be more or equal to 16.
|
## The key needs to be exactly 16 characters long.
|
||||||
##
|
##
|
||||||
## Note: This parameter is mandatory when Invidious companion is enabled
|
## Note: This parameter is mandatory when Invidious companion is enabled
|
||||||
## and should be a random string.
|
## and should be a random string.
|
||||||
## Such random string can be generated on linux with the following
|
## Such random string can be generated on linux with the following
|
||||||
## command: `pwgen 16 1`
|
## command: `pwgen 16 1`
|
||||||
##
|
##
|
||||||
## Accepted values: a string
|
## Accepted values: a string (of length 16)
|
||||||
## Default: <none>
|
## Default: <none>
|
||||||
##
|
##
|
||||||
#invidious_companion_key: "CHANGE_ME!!"
|
#invidious_companion_key: "CHANGE_ME!!"
|
||||||
|
@ -21,7 +21,7 @@ module Invidious::Routes::VideoPlayback
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Sanity check, to avoid being used as an open proxy
|
# Sanity check, to avoid being used as an open proxy
|
||||||
if !host.matches?(/[\w-]+.googlevideo.com/)
|
if !host.matches?(/[\w-]+\.(?:googlevideo|c\.youtube)\.com/)
|
||||||
return error_template(400, "Invalid \"host\" parameter.")
|
return error_template(400, "Invalid \"host\" parameter.")
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -37,7 +37,8 @@ module Invidious::Routes::VideoPlayback
|
|||||||
|
|
||||||
# See: https://github.com/iv-org/invidious/issues/3302
|
# See: https://github.com/iv-org/invidious/issues/3302
|
||||||
range_header = env.request.headers["Range"]?
|
range_header = env.request.headers["Range"]?
|
||||||
if range_header.nil?
|
sq = query_params["sq"]?
|
||||||
|
if range_header.nil? && sq.nil?
|
||||||
range_for_head = query_params["range"]? || "0-640"
|
range_for_head = query_params["range"]? || "0-640"
|
||||||
headers["Range"] = "bytes=#{range_for_head}"
|
headers["Range"] = "bytes=#{range_for_head}"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user