Skip to content

Commit

Permalink
fix: allow iframe to work in stricter cross-origin policy
Browse files Browse the repository at this point in the history
close nuxt/learn.nuxt.com#68

Co-authored-by: sqcheah <sqcheah@users.noreply.github.com>
  • Loading branch information
antfu and sqcheah committed Dec 7, 2023
1 parent 34dc294 commit 7ec0d3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/devtools/src/runtime/plugins/view/client.ts
Expand Up @@ -129,6 +129,8 @@ export async function setupDevToolsClient({
try {
iframe = document.createElement('iframe')
iframe.id = 'nuxt-devtools-iframe'
iframe.allow = 'cross-origin-isolated'
iframe.setAttribute('credentialless', 'true')
iframe.src = initialUrl
iframe.onload = async () => {
try {
Expand Down

0 comments on commit 7ec0d3c

Please sign in to comment.