gabceb / atom-web-view

Package to open a web browser inside Atom
MIT License
52 stars 8 forks source link

Can't get google.com #7

Closed gabriel-dehan closed 9 years ago

gabriel-dehan commented 10 years ago

I just can't get http://www.google.com . I'm guessing it's because there are some redirects that are not handled properly but I am not sure.

Other pages are working fine (ruby-doc.org for instance).

Any idea why ?

I'm on OS X 10.9.

speigg commented 10 years ago

It's because google has the 'X-Frame-Options' header set to 'SAMEORIGIN'. http://www.facebook.com won't work either (their 'X-Frame-Options' header is set to 'DENY').

Chrome packaged apps get around this with a custom WebView tag, which allows only asynchronous communication, and tells javascript that it is running in the "top" frame (and ignores X-Frame-Options). NodeWebkit has similar functionality with <iframe nwdisable nwfaketop> (https://github.com/rogerwang/node-webkit/issues/1030). I don't think Atom shell currently supports a way to do this (was looking into this myself). You should open an issue on their repo.