mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-19 19:38:51 +00:00
Add compile-time flag to remove code for QUIC
This commit is contained in:
@@ -53,7 +53,13 @@ module Invidious::Routes::Login
|
||||
|
||||
# See https://github.com/ytdl-org/youtube-dl/blob/2019.04.07/youtube_dl/extractor/youtube.py#L82
|
||||
begin
|
||||
client = QUIC::Client.new(LOGIN_URL)
|
||||
client = nil # Declare variable
|
||||
{% unless flag?(:disable_quic) %}
|
||||
client = QUIC::Client.new(LOGIN_URL)
|
||||
{% else %}
|
||||
client = HTTP::Client.new(LOGIN_URL)
|
||||
{% end %}
|
||||
|
||||
headers = HTTP::Headers.new
|
||||
|
||||
login_page = client.get("/ServiceLogin")
|
||||
|
||||
Reference in New Issue
Block a user