Viewing posts with tag electron.

Changing User-Agent Header in an Atom Editor Plugin

When improving Code::Stats’s Atom plugin, I wanted to add the plugin version as the User-Agent header: code-stats-atom/x.y.z. I used the fetch API and set the header there but it did nothing! By googling a bit I found that User-Agent used to be a “dangerous” header that wasn’t allowed to be set in browsers. It was only recently allowed, but Chromium has not implemented support for it.

Read more…