TerryMooreII / angular-azure-mobile-service

An AngularJS service to interact with the Azure Mobile Service Client.
MIT License
68 stars 17 forks source link

Upgrade to Azure Mobile Services 1.2.5 unsafe header error #35

Closed kevindstanley1988 closed 9 years ago

kevindstanley1988 commented 9 years ago

I know the documentation specifically states to use 1.1.2, but my project that i jumped into is already on 1.2.5. Everything seems to work fine that I have come across with your library, but I am getting an error in my console now during a table getAll request. It says "Refused to get unsafe header 'Link'". Not sure if the upgrade to 1.2.5 is a massive undertaking. I just thought I would note that it is out and this library mostly works. Except for the error the response of the calls works as expected.

ThomasPe commented 9 years ago

I only ever get that error in Chrome.

TerryMooreII commented 9 years ago

Ok, I will look into this and see what I can find out. Thanks for bringing this to my attention.

TerryMooreII commented 9 years ago

I loaded up version 1.2.5 and the service in my test app and I got the same error. However I dont believe that this is an issue with the angular service but an issue with CORS. See here: http://jaketrent.com/post/expose-http-headers-in-cors/

Also you can see the that error is coming from the MS Azure client: MobileServices.Web-1.2.5.min.js:2 Refused to get unsafe header "Link".

I will keep looking into this issue but I dont think that there is anything that I can do to fix this.

kevindstanley1988 commented 9 years ago

I dug a little further and this seems to be an issue that is chrome specific and cannot be fixed until chrome fixes it. It was a webkit issue only allowing simple headers even when they were specified explicitly on the server. I also tested with the server headers for cors setup as wildcard "*" in azure and chrome still throws it in chrome.