angularjs - angular CORS to gist -
hi guys im building angular app , have problem reaching json on gist, json
when im trying $http.get
on url im getting:
request header field authorization not allowed access-control-allow-headers in preflight response.
now see option request being sent good. im using satellizer auth service.
things tried:
$http.get(url, { headers: { 'authorization': function(conf){ return undefined; } }}).then(function(data){ $scope.countries = data; });
and tried change url https http , got: response preflight invalid (redirect)
now know server need include in response header things can make request server not mine :\ there no way modifiy it.. anyone?
problem was sending authorization
header default because of satellizer
satellizer supports skipauthorization
parameter..
$http({ url: url, method: 'get', skipauthorization: true})
this fix problem
Comments
Post a Comment