fix(core): iframe rendering issue for youtube videos (#12880)

#### PR Dependency Tree


* **PR #12880** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved iframe preview behavior for code blocks, enabling enhanced
compatibility and resource access within previews.
- **Chores**
- Updated internal server configuration to no longer set custom
cross-origin headers during development.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Peng Xiao
2025-06-20 18:19:28 +08:00
committed by GitHub
parent 62d74de810
commit da980876cb
3 changed files with 1 additions and 20 deletions
-14
View File
@@ -125,20 +125,6 @@ const defaultDevServerConfig: DevServerConfiguration = {
},
],
},
headers: (req): Record<string, string | string[]> => {
if (
[/^\/api/, /^\/socket\.io/, /^\/graphql/].some(path =>
path.test(req.path)
)
) {
return {};
}
return {
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp',
};
},
proxy: [
{
context: '/api',