Skip to content

Instantly share code, notes, and snippets.

View andrewdelprete's full-sized avatar
💭
I may be slow to respond.

Andrew Del Prete andrewdelprete

💭
I may be slow to respond.
View GitHub Profile
@andrewdelprete
andrewdelprete / app.js
Last active August 29, 2015 13:58 — forked from mariojunior/gist:6175849
Angular Cookie Fix - Standard CORS requests do not send or set any cookies by default : withCredentials
//On config definition...
angular.module("moduleName").config(
function ($routeProvider, $httpProvider) {
// ALLOWS CORS
// Standard CORS requests do not send or set any cookies by default. In order to include cookies as
// part of the request, you need withCredentials property to true.
// http://www.html5rocks.com/en/tutorials/cors/
// HERE THE IMPORTANT MAGIC LINE!