You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hmm. Thanks for pointing this out. You may have honestly found a bug — the CORS headers of the image shouldn’t be * always. Instead, they should match that of the script.
Thanks for pointing out this issue. I realize the fix may have been the exact opposite of what you expected---origin checking is now enforced for images too---but that's ultimately a security consideration. I thought that CORS was enforced for images, so when you pointed out that it wasn't, I realized that meant there was a way to get around origin enforcement!
Would it be worthwhile to attempt the loading of the fallback pixel image, in the case of XHR failure?
shynet/shynet/analytics/templates/analytics/scripts/page.js
Lines 23 to 34 in 213c44a
The pixel CORS header will always allow any host to connect
shynet/shynet/analytics/views/ingress.py
Lines 89 to 92 in 510df19
so in the event of a CORS (or other) failure on XHR - falling back to loading the
<img src="..../pixel.gif">
would theoretically work.I'm happy to do a PR for it, if deemed appropriate
The text was updated successfully, but these errors were encountered: