Add ws_token to auto-generated config
This commit is contained in:
parent
46cd0ce994
commit
e256ebd727
@ -211,6 +211,7 @@ def ask_user_config() -> Dict[str, Any]:
|
|||||||
)
|
)
|
||||||
# Force JWT token to be a random string
|
# Force JWT token to be a random string
|
||||||
answers['api_server_jwt_key'] = secrets.token_hex()
|
answers['api_server_jwt_key'] = secrets.token_hex()
|
||||||
|
answers['api_server_ws_token'] = secrets.token_urlsafe(25)
|
||||||
|
|
||||||
return answers
|
return answers
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
# We need to inherit from str so we can use as a str
|
|
||||||
class RPCMessageType(str, Enum):
|
class RPCMessageType(str, Enum):
|
||||||
STATUS = 'status'
|
STATUS = 'status'
|
||||||
WARNING = 'warning'
|
WARNING = 'warning'
|
||||||
|
@ -1086,7 +1086,7 @@ class RPC:
|
|||||||
""" Whitelist data for WebSocket """
|
""" Whitelist data for WebSocket """
|
||||||
return self._freqtrade.active_pair_whitelist
|
return self._freqtrade.active_pair_whitelist
|
||||||
|
|
||||||
@ staticmethod
|
@staticmethod
|
||||||
def _rpc_analysed_history_full(config, pair: str, timeframe: str,
|
def _rpc_analysed_history_full(config, pair: str, timeframe: str,
|
||||||
timerange: str, exchange) -> Dict[str, Any]:
|
timerange: str, exchange) -> Dict[str, Any]:
|
||||||
timerange_parsed = TimeRange.parse_timerange(timerange)
|
timerange_parsed = TimeRange.parse_timerange(timerange)
|
||||||
@ -1117,7 +1117,7 @@ class RPC:
|
|||||||
self._freqtrade.strategy.plot_config['subplots'] = {}
|
self._freqtrade.strategy.plot_config['subplots'] = {}
|
||||||
return self._freqtrade.strategy.plot_config
|
return self._freqtrade.strategy.plot_config
|
||||||
|
|
||||||
@ staticmethod
|
@staticmethod
|
||||||
def _rpc_sysinfo() -> Dict[str, Any]:
|
def _rpc_sysinfo() -> Dict[str, Any]:
|
||||||
return {
|
return {
|
||||||
"cpu_pct": psutil.cpu_percent(interval=1, percpu=True),
|
"cpu_pct": psutil.cpu_percent(interval=1, percpu=True),
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
"verbosity": "error",
|
"verbosity": "error",
|
||||||
"enable_openapi": false,
|
"enable_openapi": false,
|
||||||
"jwt_secret_key": "{{ api_server_jwt_key }}",
|
"jwt_secret_key": "{{ api_server_jwt_key }}",
|
||||||
|
"ws_token": "{{ api_server_ws_token }}",
|
||||||
"CORS_origins": [],
|
"CORS_origins": [],
|
||||||
"username": "{{ api_server_username }}",
|
"username": "{{ api_server_username }}",
|
||||||
"password": "{{ api_server_password }}"
|
"password": "{{ api_server_password }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user