Read `WHOOGLE_CONFIG_DISABLE` var as bool in app init

Fixes #636, which pointed out that the var was being interpreted as
"active" (config hidden) regardless of the value that was set.
main
Ben Busby 2022-02-01 15:29:22 -07:00
parent fef280a0c9
commit 33f56bb0cb
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ from app.filter import clean_query
from app.request import send_tor_signal
from app.utils.session import generate_user_key
from app.utils.bangs import gen_bangs_json
from app.utils.misc import gen_file_hash
from app.utils.misc import gen_file_hash, read_config_bool
from flask import Flask
from flask_session import Session
import json
@ -58,7 +58,7 @@ app.config['CONFIG_PATH'] = os.getenv(
app.config['DEFAULT_CONFIG'] = os.path.join(
app.config['CONFIG_PATH'],
'config.json')
app.config['CONFIG_DISABLE'] = os.getenv('WHOOGLE_CONFIG_DISABLE', '')
app.config['CONFIG_DISABLE'] = read_config_bool('WHOOGLE_CONFIG_DISABLE')
app.config['SESSION_FILE_DIR'] = os.path.join(
app.config['CONFIG_PATH'],
'session')