About: name the webmail node and the mail server node
Settings > About shows which webmail node answered (NODE_NAME, else the container hostname) and which inbuxa node it talks to: the address the server's name resolves to from the webmail, named by its PTR record. The server only tells administrators its node name, so the webmail works it out itself. Fetched from /api/about/nodes on every visit, cached for a minute server-side, for troubleshooting a cluster. Fork-only: upstream ihasmail runs one webmail against one server. 4 new strings, translated in all 9 catalogues.
This commit is contained in:
1 parent
119548090e
commit
6b44705bfd
14 files changed
+189
-1
No files matched your search
@@ -44,6 +44,7 @@ import { imageProxyHandler } from "./imageproxy.js";
|
||||
import { SignInError, finish as finishSignIn, needsRefresh, oauthEnabled, refreshTokens, singleServer, start as startSignIn, type TokenSet } from "./oauth.js";
|
||||
import { icsProxyHandler } from "./icsproxy.js";
|
||||
import { staticHandler } from "./static.js";
|
||||
import { mailNode, webmailNode } from "./nodes.js";
|
||||
|
||||
type Env = { Variables: { session: LiveSession } };
|
||||
|
||||
@@ -609,6 +610,12 @@ export function createApp(basePath = config.basePath): Hono<Env> {
|
||||
return c.json({ ok: true });
|
||||
});
|
||||
|
||||
/* ihasmail-inbuxa: which webmail node this is, and which mail node it talks to (nodes.ts). */
|
||||
api.get("/about/nodes", requireSession, async (c) => {
|
||||
const session = c.get("session");
|
||||
return c.json({ webmail: webmailNode(), mailServer: await mailNode(upstreamFor(session.username)) });
|
||||
});
|
||||
|
||||
api.get("/auth/sessions", requireSession, (c) => {
|
||||
const session = c.get("session");
|
||||
return c.json({ current: session.id, sessions: sessions.listForUser(session.account) });
|
||||
|
||||
Reference in new issue
Block a user