forwardemail / forwardemail/superagent

How to add `mozSystem` to XHR object?

Open
#590 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
16.6k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Mozilla has two custom extensions which can be added to the `XMLHttpRequest` object: `mozSystem` and `mozAnon`.

`mozSystem` is particularly useful because it disables the Same Origin Policy on Firefox OS applications. This allows FFxOS mobile devices to avoid preflight `OPTIONS` requests. The full documentation on this property states:

> Setting this flag to true allows making cross-site connections without requiring the server to opt-in using CORS.

https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest

Is there a way to add `mozSystem: true` to the underlying `XMLHttpRequest` object built up by `Superagent`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.