UI - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: верхняя панель, rich filters и runtime-fix DEBUG=release
This commit is contained in:
@@ -23,11 +23,25 @@ from plane.utils.url import is_valid_url
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
|
||||
def env_flag(value, default=False):
|
||||
if value is None:
|
||||
return default
|
||||
|
||||
normalized = str(value).strip().lower()
|
||||
if normalized in {"1", "true", "yes", "on", "debug"}:
|
||||
return True
|
||||
if normalized in {"0", "false", "no", "off", "release", "prod", "production"}:
|
||||
return False
|
||||
|
||||
return default
|
||||
|
||||
|
||||
# Secret Key
|
||||
SECRET_KEY = os.environ.get("SECRET_KEY", get_random_secret_key())
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = int(os.environ.get("DEBUG", "0"))
|
||||
DEBUG = env_flag(os.environ.get("DEBUG", "0"))
|
||||
|
||||
# Self-hosted mode
|
||||
IS_SELF_MANAGED = True
|
||||
|
||||
@@ -9,7 +9,7 @@ import os
|
||||
from .common import * # noqa
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = int(os.environ.get("DEBUG", 0)) == 1
|
||||
DEBUG = env_flag(os.environ.get("DEBUG", 0), default=False)
|
||||
|
||||
# Honor the 'X-Forwarded-Proto' header for request.is_secure()
|
||||
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
||||
|
||||
Reference in New Issue
Block a user