Inbox: comment on an https:// prototype (hosted preview behind sign-in)

Aperta
#4,009 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
node.js, typescript
Ambito
backend, security

Direzione di ricerca

Start by reading where the Inbox page sets its CSP header (default-src 'self' with no frame-src) and where the live proxy decides which origins it will forward, since both are limited to http://localhost:<port> today. Then look at how config.json is parsed so an inboxPrototypeOrigins allowlist can be added, and at where the proxy's "open" window keeps cookies if a per-origin jar is attempted. Done means an allowlisted https:// preview renders in the frame and element comments post through the proxy; note that proxy-side cookie handling and the hosted sign-in's frame-ancestors 'self' are the hard parts and need a maintainer's design call.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

A question card's Prototype: line accepts an https:// address, but in the Inbox that page can't be shown or commented on:

  1. The Inbox page sends default-src 'self' with no frame-src, so Chrome blocks any https:// prototype in the frame ("This content is blocked").
  2. Comments only work on pages loaded through the Inbox's local live proxy, which is limited to http://localhost:<port> apps.
  3. An app behind a sign-in can't be reviewed through the proxy either. The proxied origin isn't the app's own origin, so its session cookies and its identity provider's redirect don't apply, and most hosted sign-in pages send frame-ancestors 'self'.

So a staging or preview deployment (e.g. a Cloudflare or Vercel preview URL behind the team's sign-in) can't be reviewed with element comments in the Inbox. The only option is a local dev server on sample data.

Proposal

Let the live proxy take an https:// prototype origin the person allowlists (e.g. inboxPrototypeOrigins in config.json), the way it takes http://localhost:<port> today, so comments work on a hosted preview. Optionally, also let the proxy keep a cookie jar per prototype origin, so a sign-in done once in a full window (the proxy's "open" button) carries into the frame.

Version: plannotator 0.29.3 (Linux server, Inbox reached over Tailscale).

Lingua principale
TypeScript
Stelle
8.7k
Fork
649
Merge medio
16h 1m
PR unite (30g)
756

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di backnotprop/plannotator

Tutte le issue di backnotprop/plannotator

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.