Repository navigation
Feat/lms embed - #25
Merged
Merged
Conversation
…embed codes /embed/ask asks the published library, ?session=<id> one session. It is the only framable route; every other page keeps X-Frame-Options DENY and frame-ancestors 'none'. EMBED_FRAME_ANCESTORS narrows who may frame it. Links open in a new tab and the page posts its height to the host. Studio gets a copy-paste iframe per session and for the library. docs/EMBED.md.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Phase
No phase doc: enterprise readiness (learners stay inside the institute's LMS).
Summary
/embed/askasks the published library;/embed/ask?session=<id>asks one session (unlisted too; trials never). Optionaltheme=light|dark.X-Frame-Options: DENYandframe-ancestors 'none'./embed/*getsframe-ancestors https:, or theEMBED_FRAME_ANCESTORSlist to restrict it to an institute's LMS.SiteChrome); links open in a new tab; the page posts{ type: "pravaha:height", height }so hosts can auto-size the frame.docs/EMBED.md(snippet, Moodle/Canvas/Sites, sizing script, security, rate-limit note); SECURITY.md, README and.env.exampleupdated. Unit tests for the snippet, including title escaping.How to verify
curl -sI <preview>/embed/ask→ noX-Frame-Options, CSPframe-ancestors https:;curl -sI <preview>/→DENYandframe-ancestors 'none'.<preview>/embed/ask?session=not-a-uuid→ "This session isn't available to ask."Checklist
tests/unit/embed.test.ts)pnpm lint,pnpm typecheck,pnpm testpass.envvalues in this diffdocs/GIT_WORKFLOW.md)