Schibum/groove-de — pull request #32 by elus (2013-06-01 13:53:49+00:00)
Title: Cookie support, disabling on non-blocked websites

First of all thanks for making this extension open source.

I really didn't like the fact that it looses my login session each time I close a tab so I wrote a simple Cookie passing (from Grooveshark to "GAE proxy"). Although the same affect could be probably achieved with ```chrome.cookie``` API (I'm not that much familiar with chrome extensions).

I also added the OPTIONS to GAE proxy to allow custom headers in CORS but later discovered that the whole CORS is not really needed if proxy host matches pattern in permission section of manifest. So I added additional pattern there but left the OPTIONS in proxy in case someone still want to use it with CORS.

Also since "Origin" header is only used in CORS I use different header to distinguish the XHR requests from regular ones - ```X-Requested-With: XMLHttpRequest``` (which _de facto standard_ in AJAX libraries and thus can be easily detected by WebOb/webapp2).

Since I'm sending Grooveshark cookie to proxy I also enforced secure connection to proxy.

Last but not least - I'm detecting if the page is really blocked (since I'm often abroad or using corporate proxy) before unlocking it.

Cheers!