docs: 公网静态部署手册(game.xiangsilian.com)
线上只托管静态文件、不暴露玩具级用户 API;HTTPS 域名下大厅隐藏登录。部署步骤与 Nginx 配置记在 docs/deploy.md,便于以后 rsync 更新。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+14
-4
@@ -354,11 +354,21 @@
|
||||
}
|
||||
|
||||
// ---------- 启动 ----------
|
||||
// 公网站点只托管静态文件,不跑用户 API(PIN 明文,不宜暴露)。
|
||||
// 本地 ./web/serve.sh(http + 非 443)仍显示登录。
|
||||
const PUBLIC_STATIC =
|
||||
location.protocol === 'https:' && location.hostname.endsWith('xiangsilian.com');
|
||||
|
||||
reflectSettings();
|
||||
renderUserArea();
|
||||
if (getAuth()) {
|
||||
pullSettings();
|
||||
loadProgress();
|
||||
if (PUBLIC_STATIC) {
|
||||
const userPanel = document.getElementById('user-panel');
|
||||
if (userPanel) userPanel.hidden = true;
|
||||
} else {
|
||||
renderUserArea();
|
||||
if (getAuth()) {
|
||||
pullSettings();
|
||||
loadProgress();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -26,7 +26,8 @@ PORT=8001 tools/node/bin/node web/server/server.js
|
||||
- token 永不过期,明文存于 `data/sessions.json`;
|
||||
- HTTP 明文传输,无 TLS、无防爆破、无速率限制。
|
||||
|
||||
用途仅限于同一 WiFi 下的家庭成员各自存档。要公网部署请换正经认证方案。
|
||||
用途仅限于同一 WiFi 下的家庭成员各自存档。公网 `game.xiangsilian.com` **不跑本服务**,
|
||||
只托管静态文件(见 `docs/deploy.md`)。要公网开用户系统请换正经认证方案。
|
||||
|
||||
## API
|
||||
|
||||
|
||||
Reference in New Issue
Block a user