mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Add R2 CORS failure context logging
This commit is contained in:
1 parent
a3d3ebae0d
commit
4e71b1d320
1 file changed
+11
@@ -491,10 +491,21 @@ class R2Service {
|
||||
});
|
||||
}
|
||||
} catch (corsErr) {
|
||||
const resolvedEndpoint =
|
||||
settings.endpoint ||
|
||||
(accountId ? `https://${accountId}.r2.cloudflarestorage.com` : "");
|
||||
const corsContext = {
|
||||
bucketName,
|
||||
endpoint: resolvedEndpoint,
|
||||
region: settings.region || "",
|
||||
corsOrigins,
|
||||
};
|
||||
userLogger.warn(
|
||||
"Failed to ensure R2 bucket/CORS configuration via access keys. Ensure the bucket exists and you have permissions.",
|
||||
corsContext,
|
||||
corsErr
|
||||
);
|
||||
devLogger.warn("R2 bucket/CORS configuration details.", corsContext, corsErr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user