Skip to content

fix(memos-local-plugin): support /memos/ proxy prefix in viewer SPA#1609

Open
Starfie1d1272 wants to merge 1 commit intoMemTensor:mainfrom
Starfie1d1272:fix/viewer-memos-prefix
Open

fix(memos-local-plugin): support /memos/ proxy prefix in viewer SPA#1609
Starfie1d1272 wants to merge 1 commit intoMemTensor:mainfrom
Starfie1d1272:fix/viewer-memos-prefix

Conversation

@Starfie1d1272
Copy link
Copy Markdown

Summary

Fix the viewer SPA rendering blank when accessed through a /memos/ reverse-proxy prefix (e.g. Hermes Gateway).

Root cause

detectAgentPrefix() in web/src/api/client.ts only recognized openclaw and hermes as valid agent prefixes. When the browser loaded the SPA at /memos/, the first path segment was "memos", which didn't match → API calls were made without the prefix (/api/v1/episodes instead of /memos/api/v1/episodes) → hit 404.

Fix

Two one-line changes:

  • web/src/api/client.ts:29 — add seg === "memos" to prefix detection
  • server/http.ts:138 — add "memos" to AGENT_NAMES allowlist

🤖 Generated with Claude Code

… and server

detectAgentPrefix() only recognized openclaw/hermes, so when the viewer
was accessed through a /memos/ reverse-proxy prefix the SPA made API
calls without the prefix — hitting 404. Add 'memos' to both the
frontend prefix detector and the server-side AGENT_NAMES allowlist.
Copilot AI review requested due to automatic review settings May 1, 2026 08:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants