mirror of
https://github.com/iv-org/invidious
synced 2024-11-24 12:03:26 +01:00
Add 'secure' for cookies when SSL enabled
This commit is contained in:
parent
68d5ee95b3
commit
61e3c39ecd
@ -663,7 +663,12 @@ post "/login" do |env|
|
||||
host = URI.parse(env.request.headers["Host"]).host
|
||||
|
||||
login.cookies.each do |cookie|
|
||||
cookie.secure = false
|
||||
if Kemal.config.ssl
|
||||
cookie.secure = true
|
||||
else
|
||||
cookie.secure = false
|
||||
end
|
||||
|
||||
cookie.extension = cookie.extension.not_nil!.gsub(".youtube.com", host)
|
||||
cookie.extension = cookie.extension.not_nil!.gsub("Secure; ", "")
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user