fix(memos-local-plugin): support /memos/ proxy prefix in viewer SPA#1609
Open
Starfie1d1272 wants to merge 1 commit intoMemTensor:mainfrom
Open
fix(memos-local-plugin): support /memos/ proxy prefix in viewer SPA#1609Starfie1d1272 wants to merge 1 commit intoMemTensor:mainfrom
Starfie1d1272 wants to merge 1 commit intoMemTensor:mainfrom
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the viewer SPA rendering blank when accessed through a
/memos/reverse-proxy prefix (e.g. Hermes Gateway).Root cause
detectAgentPrefix()inweb/src/api/client.tsonly recognizedopenclawandhermesas 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/episodesinstead of/memos/api/v1/episodes) → hit 404.Fix
Two one-line changes:
web/src/api/client.ts:29— addseg === "memos"to prefix detectionserver/http.ts:138— add"memos"toAGENT_NAMESallowlist🤖 Generated with Claude Code