15 lines
574 B
Python
15 lines
574 B
Python
import os as _jwt_os
|
|
|
|
_jwt_has_private = bool(_jwt_os.environ.get("JWT_PRIVATE_KEY"))
|
|
if not _jwt_has_private:
|
|
_jwt_os.environ["JWT_PRIVATE_KEY"] = ""
|
|
with open("/jwt-config/original-production.py") as _jwt_source:
|
|
exec(compile(_jwt_source.read(), "/jwt-config/original-production.py", "exec"), globals())
|
|
if not _jwt_has_private:
|
|
_jwt_os.environ.pop("JWT_PRIVATE_KEY", None)
|
|
SIMPLE_JWT["SIGNING_KEY"] = ""
|
|
if _jwt_os.environ.get("JWT_SIGNER_MODE") == "server":
|
|
ROOT_URLCONF = "config.jwt_signer_urls"
|
|
DEBUG = False
|
|
del _jwt_has_private, _jwt_source
|