Skip to content

Commit

Permalink
Read WHOOGLE_CONFIG_DISABLE var as bool in app init
Browse files Browse the repository at this point in the history
Fixes #636, which pointed out that the var was being interpreted as
"active" (config hidden) regardless of the value that was set.
  • Loading branch information
benbusby committed Feb 1, 2022
1 parent fef280a commit 33f56bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
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
Expand Down Expand Up @@ -58,7 +58,7 @@
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')
Expand Down

0 comments on commit 33f56bb

Please sign in to comment.