fix: suppress CORS flood from excalidraw.com/og-image-3.png fetch
Docker Build (ARM64) / Build & Push (push) Successful in 2m4s
Docker Build (ARM64) / Build & Push (push) Successful in 2m4s
This commit is contained in:
@@ -725,6 +725,20 @@
|
||||
gap: 10px;
|
||||
}
|
||||
</style>
|
||||
<!-- CORS flood suppressor: intercepts @excalidraw/excalidraw internal fetch to
|
||||
https://excalidraw.com/og-image-3.png which triggers 6× CORS errors on
|
||||
non-excalidraw.com origins. Returns 204 immediately, never leaves browser. -->
|
||||
<script>
|
||||
window.fetch = new Proxy(window.fetch, {
|
||||
apply(target, thisArg, args) {
|
||||
var url = args[0];
|
||||
if (typeof url === 'string' && url.indexOf('og-image-3.png') !== -1) {
|
||||
return Promise.resolve(new Response(null, { status: 204 }));
|
||||
}
|
||||
return Reflect.apply(target, thisArg, args);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
Reference in New Issue
Block a user