Skip to content

feat(server): opt-in open write paths for self-authenticating handlers (#136) - #405

Merged
rowkav09 merged 1 commit into
mainfrom
feat/http-open-write-paths
Sep 24, 2026
Merged

rowkav09 merged 1 commit into
mainfrom
feat/http-open-write-paths

Conversation

@rowkav09

Copy link
Copy Markdown
Member

Part of #136, slice 1b-i. The YouTube extension posts from a chrome-extension://… origin, so the local server's same-origin and session-cookie checks would refuse it. createHttpServer gets an openWritePaths option: a list of exact paths whose writes skip those two checks, because the handler authenticates them itself (the bridge from #395 checks the extension origin and the pairing token).

  • Opt-in, and nothing passes it yet, so behaviour is unchanged.
  • Exact path match only (/bridge/youtube/ or any other path keeps every check). Paths are validated at start-up.
  • Open paths still must be application/json and are still capped by the body limit.

Security note: this is the only way around the write checks, and it's limited to exact paths whose handler does its own auth. The security lane is welcome to review.

Checks

@rowkav09

Copy link
Copy Markdown
Member Author

/mira resume

@github-actions

Copy link
Copy Markdown
Contributor

/mira pause

@github-actions github-actions Bot added mira-paused Pause automatic Mira reviews on this pull request area:server size:S labels Sep 24, 2026
@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@rowkav09
rowkav09 force-pushed the feat/http-open-write-paths branch from a750d4d to d1f37d1 Compare September 24, 2026 12:42
@rowkav09

Copy link
Copy Markdown
Member Author

No Mira review came in after /mira resume (Mira is still paused). Rebased, tests pass and every check is green. I reviewed it myself: exact-path opt-in only, JSON and body limit still enforced, nothing uses it yet. Merging with an explicit squash message.

@rowkav09
rowkav09 merged commit d24768e into main Sep 24, 2026
11 checks passed
@rowkav09
rowkav09 deleted the feat/http-open-write-paths branch September 24, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:server mira-paused Pause automatic Mira reviews on this pull request size:S

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant