File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,9 @@ class Config
184
184
config = Config .from_yaml(config_yaml)
185
185
186
186
# Update config from env vars (upcased and prefixed with "INVIDIOUS_")
187
+ #
188
+ # Also checks if any top-level config options are set to "CHANGE_ME!!"
189
+ # TODO: Support non-top-level config options such as the ones in DBConfig
187
190
{% for ivar in Config .instance_vars % }
188
191
{% env_id = " INVIDIOUS_#{ ivar.id.upcase } " % }
189
192
@@ -220,16 +223,19 @@ class Config
220
223
exit(1 )
221
224
end
222
225
end
226
+
227
+ # Warn when any config attribute is set to "CHANGE_ME!!"
228
+ if config.{{ivar.id}} == " CHANGE_ME!!"
229
+ puts " Config: The value of '#{ {{ivar.stringify}} } ' needs to be changed!!"
230
+ exit(1 )
231
+ end
223
232
{% end % }
224
233
225
234
# HMAC_key is mandatory
226
235
# See: https://github.com/iv-org/invidious/issues/3854
227
236
if config.hmac_key.empty?
228
237
puts " Config: 'hmac_key' is required/can't be empty"
229
238
exit(1 )
230
- elsif config.hmac_key == " CHANGE_ME!!"
231
- puts " Config: The value of 'hmac_key' needs to be changed!!"
232
- exit(1 )
233
239
end
234
240
235
241
# Build database_url from db.* if it's not set directly
You can’t perform that action at this time.
0 commit comments