Repository navigation
feat(settings): private networks for web pages and feeds in Settings → Documents - #378
Merged
Merged
Conversation
…→ Documents documents.web_networks was set only in archive.yaml or LENS_WEB_NETWORKS in .env. It's now a list in Settings → Documents (and the settings API), so an admin or their agent can let Lens fetch pages, calendar feeds and videos from an intranet without editing files. Loopback, 0.0.0.0/8 and link-local networks (cloud metadata) stay server-only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Y4mUBxDN6pTR2fykqrfYV
…s own The web app's list replaced archive.yaml's and LENS_WEB_NETWORKS's, so saving Settings → Documents dropped the server's networks, and one the web app can't allow (loopback) couldn't be saved back at all. The web app's networks are now added to the server's, and the server's ones it sends back are left out of what it saves. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Y4mUBxDN6pTR2fykqrfYV
Merged
16 of 22 tasks
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.
Requested by Adeel · project thread
Description
Before: letting Lens fetch web pages, calendar feeds or videos from a private network (an intranet wiki, a NAS) meant editing
archive.yamlor settingLENS_WEB_NETWORKSin.envand restarting. The error a blocked feed showed pointed there.After: Settings → Documents has Private networks Lens may fetch from, one network per line (
192.168.1.0/24). The settings API takesdocuments.web_networks, so an agent can set it too. The error now points at the setting.How:
documents.web_networksjoins the editable settings, validated as a list of networks and de-duplicated. Loopback,0.0.0.0/8and link-local networks (which include cloud metadata addresses) are refused from the web app and stay server-only (archive.yamlorLENS_WEB_NETWORKS), so an admin session can't point Lens at the server itself. Networks set on the server show in the field and always stay: what Settings saves is added to them, and server ones it sends back are left out of the saved list.Types of changes
!in the title)Checklist:
make hookschecks it on commit).test_an_admin_allows_a_private_network_in_settings,test_the_servers_own_networks_stay_whatever_the_web_app_saves;__tests__/settings-web-networks.test.ts)docs/accordingly. (configuration.md, api.md)## UnreleasedinCHANGELOG.md. (n/a)Done questions (AGENTS.md)
.env-only setting is in the web app; merged on green CI.PUT /api/v1/settings/documentswithweb_networks.archive.yamlor.envkeep working and stay after a save; no stored-data change.make openapi).🤖 Generated with Claude Code
https://claude.ai/code/session_014Y4mUBxDN6pTR2fykqrfYV