mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
Config: Make 'hmac_key' mandatory
This commit is contained in:
parent
75c4c0b349
commit
1647092b3c
1 changed files with 9 additions and 2 deletions
|
@ -85,7 +85,7 @@ class Config
|
||||||
# Used to tell Invidious it is behind a proxy, so links to resources should be https://
|
# Used to tell Invidious it is behind a proxy, so links to resources should be https://
|
||||||
property https_only : Bool?
|
property https_only : Bool?
|
||||||
# HMAC signing key for CSRF tokens and verifying pubsub subscriptions
|
# HMAC signing key for CSRF tokens and verifying pubsub subscriptions
|
||||||
property hmac_key : String?
|
property hmac_key : String = ""
|
||||||
# Domain to be used for links to resources on the site where an absolute URL is required
|
# Domain to be used for links to resources on the site where an absolute URL is required
|
||||||
property domain : String?
|
property domain : String?
|
||||||
# Subscribe to channels using PubSubHubbub (requires domain, hmac_key)
|
# Subscribe to channels using PubSubHubbub (requires domain, hmac_key)
|
||||||
|
@ -204,6 +204,13 @@ class Config
|
||||||
end
|
end
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
|
# HMAC_key is mandatory
|
||||||
|
# See: https://github.com/iv-org/invidious/issues/3854
|
||||||
|
if config.hmac_key.empty?
|
||||||
|
puts "Config: 'hmac_key' is required/can't be empty"
|
||||||
|
exit(1)
|
||||||
|
end
|
||||||
|
|
||||||
# Build database_url from db.* if it's not set directly
|
# Build database_url from db.* if it's not set directly
|
||||||
if config.database_url.to_s.empty?
|
if config.database_url.to_s.empty?
|
||||||
if db = config.db
|
if db = config.db
|
||||||
|
|
Loading…
Reference in a new issue