feat: add TRANSPORT_ENCRYPTION toggle for easier deployment

- Add TRANSPORT_ENCRYPTION env config (default: false)
- Allow HTTP/IP access when transport encryption is disabled
- Add /api/crypto/config endpoint to expose encryption status
- Update WebCryptoEnvironmentCheck with 'disabled' status
- Update ExchangeConfigModal and AITradersPage to allow form submission when disabled
- Add i18n translations for disabled status (EN/CN)
- Update README with two deployment modes documentation
This commit is contained in:
tinkle-community
2025-12-09 18:04:42 +08:00
parent 5f3797e255
commit c720d663f1
11 changed files with 225 additions and 13 deletions
+11
View File
@@ -37,6 +37,17 @@ DATA_ENCRYPTION_KEY=your-base64-encoded-32-byte-key
# Note: Replace newlines with \n for single-line format
RSA_PRIVATE_KEY=-----BEGIN RSA PRIVATE KEY-----\nYOUR_KEY_HERE\n-----END RSA PRIVATE KEY-----
# ===========================================
# Security Options
# ===========================================
# Transport encryption for API keys (default: false)
# When enabled, browser uses Web Crypto API to encrypt API keys before sending
# Requires HTTPS or localhost to work
# Set to true for enhanced security (HTTPS required)
# Set to false for easier deployment (HTTP/IP access allowed)
TRANSPORT_ENCRYPTION=false
# ===========================================
# Optional: External Services
# ===========================================