Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Vite integration iframe content fetch connection refused with Cross Origin Embedder Policy applied #565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
abiari opened this issue Aug 7, 2024 · 3 comments · Fixed by #710
Labels
usage Usage issue/question

Comments

@abiari
Copy link

abiari commented Aug 7, 2024

I have Cross Origin Embedder/Opener policies headers set to enable sharedArrayBuffer access.
If i remove the Cross Origin headers, the devtools works as expected.

code

Dev tools attempt to fetch the entry html file fails.

Screenshot from 2024-08-07 16-25-08

Screenshot from 2024-08-07 16-24-11

@alexzhang1030
Copy link
Member

alexzhang1030 commented Aug 12, 2024

When you set this header, the devtools floating panel(embedded in the page as an iframe) will be refused to load by the browser. If you need that, you can use localhost:3000/__devtools__/ separate window.

@nighca
Copy link
Contributor

nighca commented Nov 22, 2024

@abiari I made a PR (#710) to fix this.

When you set this header, the devtools floating panel(embedded in the page as an iframe) will be refused to load by the browser.

@alexzhang1030 The blockage can be avoided by applying the same headers to the devtools page response as those on the application page, which can be configured using server.headers in the Vite config.

@abiari
Copy link
Author

abiari commented Mar 10, 2025

@nighca Thank you lots for this, I will spin this up asap to test and feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage Usage issue/question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants