mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix: blob sync
This commit is contained in:
@@ -172,9 +172,13 @@ function ensureFrameAncestors(
|
||||
});
|
||||
}
|
||||
|
||||
function allowCors(headers: Record<string, string[]>) {
|
||||
function allowCors(
|
||||
headers: Record<string, string[]>,
|
||||
origin: string = 'assets://.'
|
||||
) {
|
||||
// Signed blob URLs redirect to *.usercontent.affine.pro without CORS headers.
|
||||
setHeader(headers, 'Access-Control-Allow-Origin', '*');
|
||||
setHeader(headers, 'Access-Control-Allow-Origin', origin);
|
||||
setHeader(headers, 'Access-Control-Allow-Credentials', 'true');
|
||||
setHeader(headers, 'Access-Control-Allow-Methods', 'GET, HEAD, OPTIONS');
|
||||
setHeader(
|
||||
headers,
|
||||
|
||||
Reference in New Issue
Block a user