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

Đang mở
#4,009 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
20/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
node.js, typescript
Lĩnh vực
backend, security

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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).

Ngôn ngữ chính
TypeScript
Star
8.7k
Fork
649
Merge trung bình
16 giờ 1 phút
Pull request đã merge (30 ngày)
756

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của backnotprop/plannotator

Tất cả issue của backnotprop/plannotator

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.