Hide the brand from unauthenticated requests
GET /ui/brand answered without auth with {"brand":"Forgetting",…}: one
request was enough for a scanner to tell a found port is this panel. It now
requires the panel JWT (Go and the Node reference alike). The login screen
says just «Вход», the page title is neutral until login, and the wordmark
loads after sign-in.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013bNGYiDst62wH3ZGTRPFLJ
This commit is contained in:
+3
-3
@@ -206,9 +206,9 @@ app.post("/logout", requireAuth, (req: Request, res: Response) => {
|
||||
res.json({ ok: true });
|
||||
});
|
||||
|
||||
// Единственный роут без авторизации: вордмарк нужен уже на экране логина,
|
||||
// до выдачи JWT. Наружу уходит только имя продукта и версия.
|
||||
app.get("/ui/brand", (_req: Request, res: Response) => {
|
||||
// За авторизацией: без неё сканер одним GET узнавал бы, что на порту панель Forgetting.
|
||||
// Экран логина обходится без вордмарка.
|
||||
app.get("/ui/brand", requireAuth, (_req: Request, res: Response) => {
|
||||
res.json({ brand: BRAND, channel: CHANNEL, version: VERSION });
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user