mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-11 15:16:28 +08:00
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user