將 API_URL 改為 HTTPS 端點,透過 NPM 反代解決 Mixed Content

前端透過 HTTPS 提供時,瀏覽器會阻擋對 HTTP 後端的請求。
改走 https://poke-api.lotimmy.com/scan(由 NPM 反向代理到內網 8008 port)
即可避免 Mixed Content 錯誤。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
timmy
2026-04-20 10:25:10 +08:00
parent 9868116043
commit 3489b4ffa1

View File

@@ -209,7 +209,7 @@
<script>
// 後端 API 端點;改 IP / port 只改這一行
const API_URL = 'http://192.168.42.108:8008/scan';
const API_URL = 'https://poke-api.lotimmy.com/scan';
// 掃描中心座標(後端目前會忽略此值,純 schema 相容)
const SCAN_CENTER = { lat: 25.0478, lng: 121.5170 };