chore: clarify gmail serve path

This commit is contained in:
Peter Steinberger
2025-12-24 21:20:06 +00:00
parent 8f934bf817
commit 9ceb8731d3

View File

@@ -80,6 +80,9 @@ export function normalizeHooksPath(raw?: string): string {
export function normalizeServePath(raw?: string): string {
const base = raw?.trim() || DEFAULT_GMAIL_SERVE_PATH;
// Tailscale funnel/serve strips the set-path prefix before proxying.
// To accept requests at /<path> externally, gog must listen on "/".
if (base === "/") return "/";
const withSlash = base.startsWith("/") ? base : `/${base}`;
return withSlash.replace(/\/+$/, "");
}