|
|
|
@ -58,6 +58,7 @@ end
|
|
|
|
|
alias IV = Invidious
|
|
|
|
|
|
|
|
|
|
CONFIG = Config.load
|
|
|
|
|
HMAC_KEY_CONFIGURED = CONFIG.hmac_key != nil
|
|
|
|
|
HMAC_KEY = CONFIG.hmac_key || Random::Secure.hex(32)
|
|
|
|
|
|
|
|
|
|
PG_DB = DB.open CONFIG.database_url
|
|
|
|
@ -230,6 +231,10 @@ Kemal.config.host_binding = Kemal.config.host_binding != "0.0.0.0" ? Kemal.confi
|
|
|
|
|
Kemal.config.port = Kemal.config.port != 3000 ? Kemal.config.port : CONFIG.port
|
|
|
|
|
Kemal.config.app_name = "Invidious"
|
|
|
|
|
|
|
|
|
|
if !HMAC_KEY_CONFIGURED
|
|
|
|
|
LOGGER.warn("Please configure hmac_key by July 1st, see more here: https://github.com/iv-org/invidious/issues/3854")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# Use in kemal's production mode.
|
|
|
|
|
# Users can also set the KEMAL_ENV environmental variable for this to be set automatically.
|
|
|
|
|
{% if flag?(:release) || flag?(:production) %}
|
|
|
|
|