feat(backend): encrypt exchange credentials, remove IS_DEMO_MODE
- Fernet encrypt qd_exchange_credentials via SECRET_KEY (cryptography) - Remove global read-only demo middleware; drop is_demo from auth payloads - Egress whitelist: /api/credentials/egress-ip returns ipv4 + ipv6 (ipify) - Exchange factory: demo/testnet URLs and OKX simulated-trading header - Bitget spot connection test; misc route/service fixes Made-with: Cursor
This commit is contained in:
@@ -91,14 +91,6 @@ def main():
|
||||
print(msg)
|
||||
raise RuntimeError("Insecure SECRET_KEY configuration: using default example value in non-debug mode")
|
||||
|
||||
# Check demo mode status for debugging
|
||||
demo_status = os.getenv('IS_DEMO_MODE', 'false').lower()
|
||||
print(f"Status Check: IS_DEMO_MODE={demo_status}")
|
||||
if demo_status == 'true':
|
||||
print("!!! RUNNING IN DEMO MODE (READ-ONLY) !!!")
|
||||
else:
|
||||
print("Running in FULL ACCESS mode")
|
||||
|
||||
print(f"Service starting at: http://{Config.HOST}:{Config.PORT}")
|
||||
|
||||
# Flask dev server is for local development only.
|
||||
|
||||
Reference in New Issue
Block a user