Uh oh!
There was an error while loading. Please reload this page.
fix(self-host): Memory tab 401 when opening the dash via LAN IP - #1637
Open
Souravrajvi0 wants to merge 1 commit into
Open
fix(self-host): Memory tab 401 when opening the dash via LAN IP#1637Souravrajvi0 wants to merge 1 commit into
Souravrajvi0 wants to merge 1 commit into
Conversation
supermemory-server only auto-applies the local API key when Host is localhost/127.0.0.1/::1. The dash Memory tab never sends Authorization, so documents and stats 401 on a LAN hostname (supermemoryai#1538). Document the Host-based auth gap and add a small proxy that injects the banner API key so the UI works at http://<lan-ip>:6768.
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 freeto 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.
Fixes#1538
Problem
On supermemory-server v0.0.8, the local dash at
/loads when you browse via a LAN/public IP, but the Memory tab returns 401 Unauthorized for documents and stats.Local auto-auth only applies when the request Host is
localhost,127.0.0.1, or::1./local-console.jscallsPOST /v3/documents/documentsandGET /v3/container-tags/listwith noAuthorizationheader, so those requests 401 off-loopback. Sending the banner key asAuthorization: Bearer sm_…succeeds on the same IP (the workaround the reporter already uses).Reproduced on this VM against the official
server-v0.0.8linux-x64 binary:POST /v3/documents/documents→127.0.0.1:6767(no auth):6767(no auth){"error":"Unauthorized"}:6767+Authorization: Bearer <banner key>The self-hosted binary is not built from this public tree, so this PR cannot change that Host check in-process.
This PR
scripts/lan-dashboard-proxy.mjs, which forwards to supermemory-server and injects theapi-keyfile when the Memory tab omits it. Openinghttp://<lan-ip>:6768then loads documents/stats.Verified: same LAN IP that 401s on
:6767returns 200 forPOST /v3/documents/documentsandGET /v3/container-tags/listthrough the proxy.A first-class fix still belongs in supermemory-server (send the key from the dash, or an explicit
SUPERMEMORY_TRUSTED_HOSTSallowlist). Until aserver-v*release includes that, the tunnel or this proxy unblocks LAN browsing.