Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 798 forks source link

Notifications: load WP.com tracking pixel with crossorigin attribute #19411

Open swissspidy opened 3 years ago

swissspidy commented 3 years ago

Steps to reproduce the issue

For the Web Stories WordPress plugin we set cross-origin isolation on some admin pages, which requires loading 3P resources with the crossorigin attribute.

If not done, loading these resources will fail with console errors. This is the case for the Notifications module. And potentially others as well.

  1. Activate Web Stories for WordPress
  2. Activate Notifications module
  3. Go to Stories -> My Stories or Stories -> Add New
  4. Check console errors

What I expected

The tracking pixel should be loading just fine, no console errors.

For this, the <img> needs to be loaded with the crossorigin attribute.

The image itself should have a Access-Control-Allow-Origin: * response header.

What happened instead

See console error because tracking pixel is not loaded with crossorigin attribute

Screenshots If applicable, add screenshots to help explain your problem.

Screenshot 2021-04-04 at 16 30 15
jeherve commented 3 years ago

Internal reference: pMz3w-e4p-p2