security: 移除 hard-coded FUNCTION_TOKEN,改從 env 讀取
- pokemon_location_fetcher.py:DEFAULT_URL/TOKEN 改走 os.getenv,並補 load_dotenv() 讓 fetch_and_upload.sh 能從 .env 取值 - run_pokemon_radar_api.sh:POKER_* 改為可由環境覆蓋(實務上未被 API 使用,保留結構) - pyproject.toml:補宣告 python-dotenv(專案已使用但原本未列) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
cd /opt/pokemon-radar-api
|
||||
|
||||
export POKER_URL="http://192.168.42.124:13000/function"
|
||||
export POKER_TOKEN="6R0W53R135510"
|
||||
export POKER_SCRIPT="twpk_radar.mjs"
|
||||
# POKER_* 目前 unused(API 只讀 REDIS_*);保留結構,實際值放 .env
|
||||
export POKER_URL="${POKER_URL:-}"
|
||||
export POKER_TOKEN="${POKER_TOKEN:-}"
|
||||
export POKER_SCRIPT="${POKER_SCRIPT:-twpk_radar.mjs}"
|
||||
|
||||
# uv run uvicorn pokemon_radar_api:app --host 0.0.0.0 --port 8008
|
||||
|
||||
|
||||
Reference in New Issue
Block a user