forked from orbit-oss/flask
Disable debug when FLASK_DEBUG=False (#2155)
Convert FLASK_DEBUG envvar to lower before test if in tuple
This commit is contained in:
parent
47e8410117
commit
3fc8be5a4e
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ def get_debug_flag(default=None):
|
||||||
val = os.environ.get('FLASK_DEBUG')
|
val = os.environ.get('FLASK_DEBUG')
|
||||||
if not val:
|
if not val:
|
||||||
return default
|
return default
|
||||||
return val not in ('0', 'false', 'no')
|
return val.lower() not in ('0', 'false', 'no')
|
||||||
|
|
||||||
|
|
||||||
def _endpoint_from_view_func(view_func):
|
def _endpoint_from_view_func(view_func):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue