Skip to content

Commit

Permalink
fix(fetch): set credentials: 'same-origin' in fetch options to suppor…
Browse files Browse the repository at this point in the history
…t sending IWA cookies

AFFECTS PACKAGES:
@esri/arcgis-rest-request
  • Loading branch information
jgravois committed May 14, 2018
1 parent fbc4f3c commit a4d0115
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/arcgis-rest-request/src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ export function request(
};

const fetchOptions: RequestInit = {
method: httpMethod
method: httpMethod,
// ensures behavior mimics XMLHttpRequest. needed to support sending IWA cookies
credentials: "same-origin"
};

return (authentication ? authentication.getToken(url) : Promise.resolve(""))
Expand Down

0 comments on commit a4d0115

Please sign in to comment.