Repository navigation
fix(api): guard config, logs and dumps on public hosts - #911
Merged
Merged
Conversation
Treat those GETs like backups and CalDAV credentials: same-origin on the LAN still works; a public hostname needs FTW_API_TOKEN. Status and energy reads stay compatible.
frahlg
force-pushed
the
agent/protect-sensitive-reads
branch
from
August 14, 2026 05:28
fe7765c to
f3cc280
Compare
1 of 5 tasks
This was referenced Aug 14, 2026
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
FTW_API_TOKENand the local-address check already stop writes, backups and CalDAV passwords on a public hostname. They did not stop GET requests that reveal:This applies the same gate to those reads. Same-origin LAN use and private-address
curlstill work. A public hostname needs the bearer token. Cross-site GET is blocked and protected answers setCache-Control: no-store.Live dashboard reads such as status, energy, prices and plan stay open on purpose. LAN access still has no login; that is separate work.
Base
Rebased onto the #909 merge commit on
master; this PR now contains only the protected-read change.Checks
go test ./internal/api/make verifymake verify-all, including Linux arm64/amd64 and Windows amd64 buildshttp://<box>:8080on the LANOut of scope