quarto-dev / quarto-dev/quarto-cli
Support for credentialless iframes to address COEP header needs
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
if we see credentialless in the raw params, we should pass it along.
Discussed in https://github.com/quarto-dev/quarto-cli/discussions/4913
Originally posted by coatless March 21, 2023
Right now, the video short code {{ video }} provides a standard iframe that automatically assumes the pages default headers.
Would it be possible to have the short-code support or set by default a credentialless state? e.g.
<iframe credentialless src="https://example.com">
The credentialles state is important for Cross-Origin-Embedder-Policy
(COEP) environments. For webR startup and package installs, we need to set the COOP and COEP headers to significantly speed up the availability of in the browser R editor. We're running into issues with the iframe because when we turn on COEP, then any embedded lecture video from YouTube using the video shortcode is blocked with "youtube refused to connect."

By having the <iframe> tag include credentialless, the iframe is loaded from a different, empty context. In particular, it is loaded without cookies. This allows for the removal of the COEP restriction for just the video will allow the entire page to still fall under the custom COOP and COEP headers.
For more background, please see:
- Background on
iframe-credentiallessset: https://developer.chrome.com/blog/iframe-credentialless/ - Initial Proposal: https://github.com/camillelamy/explainers/blob/main/anonymous_iframes.md
Where the issue arose: https://github.com/coatless/quarto-webr/issues/8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/resources/extensions/quarto/video/video.lua at the linked iframe-generation lines and inspect how raw parameters are handled. Verify that a supplied credentialless parameter is reflected in the generated iframe output, then check the existing video shortcode behavior to confirm the change does not alter unrelated parameters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100