fix: add /station and /sessions route aliases
This commit is contained in:
parent
a91e83bf5c
commit
1aede6418d
|
|
@ -19,6 +19,11 @@ if (!fs.existsSync(SESSIONS_DIR)) fs.mkdirSync(SESSIONS_DIR, { recursive: true }
|
|||
app.use(express.json());
|
||||
app.use(express.static(path.join(__dirname)));
|
||||
|
||||
// /station → station.html エイリアス
|
||||
app.get('/station', (req, res) => res.sendFile(path.join(__dirname, 'station.html')));
|
||||
// /sessions → sessions.html エイリアス
|
||||
app.get('/sessions', (req, res) => res.sendFile(path.join(__dirname, 'sessions.html')));
|
||||
|
||||
// セッション API 用ミドルウェア(Tailscale ネットワーク外からのアクセスを拒否)
|
||||
function requireLocal(req, res, next) {
|
||||
const ip = req.ip || req.connection.remoteAddress || '';
|
||||
|
|
|
|||
Loading…
Reference in New Issue