This is a really nice write up, thanks for sharing! It's interesting that you had to go so far out of the way to forge the referer header, I suppose it makes sense to prevent that for normal...
This is a really nice write up, thanks for sharing!
It's interesting that you had to go so far out of the way to forge the referer header, I suppose it makes sense to prevent that for normal browser JS, but it's odd that the node version would be the same way. I suppose they just reused the browser version.
Thanks! Electron is just based on Chromium - it relies on Chrome for its rendering and interpreter, and even uses its devtools for debugging. If I had decided to use node's http or request I...
Thanks!
Electron is just based on Chromium - it relies on Chrome for its rendering and interpreter, and even uses its devtools for debugging. If I had decided to use node's http or request I wouldn't have had these issues, it's just the library I was using used XMLHttpRequest, which is a browser-only feature, and that's why it ran into those issues.
Doing a full replacement of XMLHttpRequest is actually a non trivial task, and I've been spending some time debugging certain features today. I'm not sure the node-xhr2 library is a perfect clone of the browser's.
This is a really nice write up, thanks for sharing!
It's interesting that you had to go so far out of the way to forge the referer header, I suppose it makes sense to prevent that for normal browser JS, but it's odd that the node version would be the same way. I suppose they just reused the browser version.
Thanks!
Electron is just based on Chromium - it relies on Chrome for its rendering and interpreter, and even uses its devtools for debugging. If I had decided to use node's
http
orrequest
I wouldn't have had these issues, it's just the library I was using used XMLHttpRequest, which is a browser-only feature, and that's why it ran into those issues.Doing a full replacement of XMLHttpRequest is actually a non trivial task, and I've been spending some time debugging certain features today. I'm not sure the
node-xhr2
library is a perfect clone of the browser's.