Adding Access-Control-Request-Headers support

To be full CORS compliant,  `Access-Control-Allow-Origin` isn't the only required response header, you also need to add `Access-Control-Request-Headers` matching all values (besides `accept`) in the `Access-Control-Request-Headers` request header.
As requestListener and responseListener are called from
browserAction.onClicked.addListener,
they both use the accessControlRequestHeaders that I declared locally (they
are children scope).

I remove the console log and I re-pull :)


On Fri, Jul 18, 2014 at 3:35 PM, Vitaly Pereverzev <notifications@github.com
> wrote:

> In background.js:
>
> > @@ -35,6 +52,9 @@ chrome.runtime.onInstalled.addListener(function(){
> >
> >  /*Icon change*/
> >  chrome.browserAction.onClicked.addListener(function(tab){
> > +
> > +	var accessControlRequestHeaders;
>
> accessControlRequestHeaders - this variable is local to current handler
> function
> And in 'requestListener' you implicitly create global variable - better
> clearly define it as global.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/vitvad/Access-Control-Allow-Origin/pull/5/files#r15110394>
> .
>