function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel) {
    return tunnel ? tunnel : _getEnvelopeEndpoint(dsn) + "?" + _encodedAuth(dsn);
}
Returns the envelope endpoint URL with auth in the query string.

Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.