mirror of
https://github.com/iv-org/invidious.git
synced 2025-03-27 07:58:14 -04:00
Add missing context_type
This commit is contained in:
parent
705d307b60
commit
24858d7afa
@ -86,6 +86,8 @@ statistics = {
|
|||||||
"error" => "Statistics are not availabile.",
|
"error" => "Statistics are not availabile.",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proxies = PROXY_LIST
|
||||||
|
|
||||||
decrypt_function = [] of {name: String, value: Int32}
|
decrypt_function = [] of {name: String, value: Int32}
|
||||||
spawn do
|
spawn do
|
||||||
update_decrypt_function do |function|
|
update_decrypt_function do |function|
|
||||||
@ -99,9 +101,14 @@ before_all do |env|
|
|||||||
env.response.headers["X-XSS-Protection"] = "1; mode=block;"
|
env.response.headers["X-XSS-Protection"] = "1; mode=block;"
|
||||||
env.response.headers["X-Content-Type-Options"] = "nosniff"
|
env.response.headers["X-Content-Type-Options"] = "nosniff"
|
||||||
|
|
||||||
|
preferences = DEFAULT_USER_PREFERENCES.dup
|
||||||
|
|
||||||
locale = env.params.query["hl"]?
|
locale = env.params.query["hl"]?
|
||||||
locale ||= "en-US"
|
locale ||= "en-US"
|
||||||
env.set "locale", locale
|
|
||||||
|
preferences.locale = locale
|
||||||
|
|
||||||
|
env.set "preferences", preferences
|
||||||
end
|
end
|
||||||
|
|
||||||
# API Endpoints
|
# API Endpoints
|
||||||
@ -1904,7 +1911,11 @@ if Kemal.config.ssl
|
|||||||
end
|
end
|
||||||
|
|
||||||
Kemal.config.powered_by_header = false
|
Kemal.config.powered_by_header = false
|
||||||
|
add_handler FilteredCompressHandler.new
|
||||||
add_handler APIHandler.new
|
add_handler APIHandler.new
|
||||||
|
add_handler DenyFrame.new
|
||||||
|
add_context_storage_type(User)
|
||||||
|
add_context_storage_type(Preferences)
|
||||||
|
|
||||||
Kemal.config.logger = logger
|
Kemal.config.logger = logger
|
||||||
Kemal.run
|
Kemal.run
|
||||||
|
Loading…
x
Reference in New Issue
Block a user