docs: 公网静态部署手册(game.xiangsilian.com)

线上只托管静态文件、不暴露玩具级用户 API;HTTPS 域名下大厅隐藏登录。部署步骤与 Nginx 配置记在 docs/deploy.md,便于以后 rsync 更新。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
xsl
2026-08-31 11:43:32 +08:00
co-authored by Cursor
parent fab638fc5f
commit 2de1fecbc6
4 changed files with 181 additions and 6 deletions
+14 -4
View File
@@ -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>