sgruhier/typeahead-addresspicker

CORS issue with having Pusher + Ember

Closed this issue · 2 comments

I am having a strange issue, when I start typing the address it throws this error,

XMLHttpRequest cannot load https://maps.googleapis.com/maps/api/geocode/json?address=Florida&region=&components=country%3AUS. Request header field X-Pusher-Socket is not allowed by Access-Control-Allow-Headers in preflight response.

The addresspicker just works fine on everyother page, but having issues with the page that has ember app on it, the ember app does have the pusher as well.

It looks like you ember app adds X-Pusher-Socket header in XHR http request.
preflight request to google maps doesn't want to support X-Pusher-Socket. The only way I think for you to solve that is to remove the X-Pusher-Socket header.
I'm not an ember guy. I know angular. Angular has XHR interceptor. I guess ember has something similar. HTH

Yes, you are right, just found out that.

I am looking for someway in jQuery to exclude this header from addresspicker request, but no luck yet.