mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-12 23:56:36 +08:00
fix: image proxy url (#14505)
#### PR Dependency Tree * **PR #14505** 👈 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 * **Improvements** * Better image-proxy detection to avoid double-proxying already proxied images. * Improved runtime image proxy configuration so images load consistently across deployments. * More robust image URL handling for optimized image loading and fewer redundant requests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -60,10 +60,14 @@ export async function run() {
|
||||
corsOriginCallback(
|
||||
origin,
|
||||
finalAllowedOrigins,
|
||||
blockedOrigin =>
|
||||
logger.warn(`Blocked CORS request from origin: ${blockedOrigin}`, {
|
||||
requestPath,
|
||||
}),
|
||||
blockedOrigin => {
|
||||
if (!appendedOrigins.length) {
|
||||
logger.warn(
|
||||
`Blocked CORS request from origin: ${blockedOrigin}`,
|
||||
{ requestPath }
|
||||
);
|
||||
}
|
||||
},
|
||||
originCallback
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user