Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document withCredentials and its non standard default #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jamestalmage
Copy link

withCredentials defaults to false on XMLHttpRequest, but the opposite was chosen in this library. This can cause difficult to understand failures depending on the CORS headers returned by the server (it's an issue when calling the GitHub v3 API for example).

The alternative would be to default to false to stay consistent with XMLHttpRequest, but that is likely a breaking change for some downstream apps, and I am going to assume the current strategy was chosen for a reason.

`withCredentials` defaults to `false` on `XMLHttpRequest`, but the opposite was chosen in this library. This can cause difficult to understand failures depending on the CORS headers returned by the server (it's an issue when calling the GitHub v3 API for example).

The alternative would be to default to `false` to stay consistent with `XMLHttpRequest`, but that is likely a breaking change for some downstream apps, and I am going to assume the current strategy was chosen for a reason.
jamestalmage added a commit to jamestalmage/node-github that referenced this pull request Jun 30, 2015
The main issue preventing browserify usage was computed paths
in require statements: `require("./" + someVariable)`. Those have
all been eliminated.

This patch only adds browser support for `v3.0.0` (see the throwing
code in `/index.js` where it states exactly that to understand why).
Hint: it's related to computed paths again.

There were also a number of issues in `browserify-http`, and
`browserify-https` that I needed to code around to get things working:

  - https://github.com/substack/https-browserify/pull/1
  - browserify/http-browserify#90
  - browserify/http-browserify#21
  - browserify/http-browserify#10
@elyobo
Copy link

elyobo commented Mar 23, 2016

Yeah, this was a surprise for me. It would be interesting if @substack could add to this PR to give the background for the withCredentials default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants