Remove CORS Accept-Encoding header on Safari

2019-04-12 10:38发布

问题:

I made a javascript bookmarklet which accesses byte-shuffled images (whence I make ArrayBuffer CORS) on a publicly shared google-drive folder. Works great on Firefox, Chrome, Opera, and even Safari 5.something (I run on windows).

However, one user told me it didn't work on Safari 7.0.3 (and I don't know if it works in Safari 6.something).

From what I understand the request cannot load because Safari adds an "Accept-Encoding" into the preflight, while google's Access-Control-Allow-Headers doesn't mention this header.

Since I don't think I can alter myself google's Access-Control-Allow-Headers, is it possible to nullify this header on the browser's side? (specifically, on Safari's side ^^). I can't test that myself, that's why I ask here.