Skip to content

Conversation

@robintown
Copy link
Member

By omitting the crossOrigin attribute, we change avatars to use a non-CORS request to fetch the image. This allows avatars to load even on null origins (fixing element-hq/element-web#26491), but also prevents us from inspecting the image data in JavaScript, for example by using it in a canvas. We weren't doing that of course, so switching to the locked-down non-CORS mode should have no consequences.

Closes element-hq/compound#293

By omitting the crossOrigin attribute, we change avatars to use a non-CORS request to fetch the image. This allows avatars to load even on null origins (fixing element-hq/element-web#26491), but also prevents us from inspecting the image data in JavaScript, for example by using it in a canvas. We weren't doing that of course, so switching to the locked-down non-CORS mode should have no consequences.
@robintown robintown requested a review from a team as a code owner May 14, 2024 18:12
@robintown robintown requested review from dbkr and t3chguy and removed request for a team May 14, 2024 18:12
@cloudflare-workers-and-pages
Copy link

Deploying compound-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5f0b5bd
Status: ✅  Deploy successful!
Preview URL: https://7dd01ab5.compound-web.pages.dev
Branch Preview URL: https://avatar-no-cors.compound-web.pages.dev

View logs

@t3chguy
Copy link
Member

t3chguy commented May 14, 2024

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avatar forces crossOrigin=anonymous which is not always appropriate

3 participants