refactor: remove env vars from oc_config_helper, keep validation in run.sh
Environment variables are fully handled by run.sh: - run.sh reads gateway_env_vars from options.json - run.sh validates variable names (alphanumeric + underscore) - run.sh enforces max 50 variables and 255 char name limit - run.sh exports to process environment oc_config_helper.py now only manages gateway config (mode, port, bind). Removes: - env_vars parameter from apply_gateway_settings() - All env var parsing and validation from Python helper - MAX_ENV_VARS constants - env_vars CLI argument
This commit is contained in:
@@ -400,7 +400,7 @@ fi
|
||||
|
||||
if [ -f "$OPENCLAW_CONFIG_PATH" ]; then
|
||||
if [ -f "$HELPER_PATH" ]; then
|
||||
if ! python3 "$HELPER_PATH" apply-gateway-settings "$GATEWAY_MODE" "$GATEWAY_BIND_MODE" "$GATEWAY_PORT" "$ENABLE_OPENAI_API" "$ALLOW_INSECURE_AUTH" "$GW_ENV_VARS"; then
|
||||
if ! python3 "$HELPER_PATH" apply-gateway-settings "$GATEWAY_MODE" "$GATEWAY_BIND_MODE" "$GATEWAY_PORT" "$ENABLE_OPENAI_API" "$ALLOW_INSECURE_AUTH"; then
|
||||
rc=$?
|
||||
echo "ERROR: Failed to apply gateway settings via oc_config_helper.py (exit code ${rc})."
|
||||
echo "ERROR: Gateway configuration may be incorrect; aborting startup."
|
||||
|
||||
Reference in New Issue
Block a user