googlearchive / apigee-javascript-sdk

The Apigee Mobile Development SDK for HTML5 Apps!
Apache License 2.0
43 stars 32 forks source link

Prevent X-Apigee-Client-* headers being sent to non-Apigee requests #66

Open getvictor opened 9 years ago

getvictor commented 9 years ago

I'm using Apigee SDK as well as other APIs.

I see that Apigee is always adding its headers to every HTTP request that goes out, whether the request needs them or not. This is causing issues when using other CORS APIs which don't support these headers, like the Dropbox API.

Access-Control-Request-Headers: authorization,x-apigee-client-app-name,x-apigee-client-device-id,x-apigee-client-org-name,x-apigee-client-request-id,x-apigee-client-session-id,x-dropbox-request-id

How to prevent these headers being sent to other non-Apigee APIs?

getvictor commented 9 years ago

The workaround is to disable network monitoring in the Apigee app Configure menu.

prabhatjha commented 9 years ago

I thought we had a configuration option to toggle this feature. If you look at https://github.com/apigee/apigee-javascript-sdk/blob/master/apigee.js#L3699 , it accepts lots of config options. Are you in a position to add one more config check and send a pull request?

prabhatjha commented 9 years ago

That works but then you loose this awesome feature of being able to some perf metrics. If you don't need those then your workaround is good and that's why we added that flag to begin with. I think it will be good to have more fine grained control hence a need for PR. ;-)

On Sun, Dec 14, 2014 at 3:32 PM, getvictor notifications@github.com wrote:

The workaround is to disable network monitoring in the Apigee app Configure menu.

— Reply to this email directly or view it on GitHub https://github.com/apigee/apigee-javascript-sdk/issues/66#issuecomment-66935600 .

Cheers,

Prabhat

Help spread www.eejot.org