{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-desktop/issues/308","repository_url":"https://api.github.com/repos/Automattic/wp-desktop","labels_url":"https://api.github.com/repos/Automattic/wp-desktop/issues/308/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-desktop/issues/308/comments","events_url":"https://api.github.com/repos/Automattic/wp-desktop/issues/308/events","html_url":"https://github.com/Automattic/wp-desktop/pull/308","id":236469724,"number":308,"title":"Preview: Ignore x-frame-options for iframes","user":{"login":"marekhrabe","id":156676,"avatar_url":"https://avatars0.githubusercontent.com/u/156676?v=3","gravatar_id":"","url":"https://api.github.com/users/marekhrabe","html_url":"https://github.com/marekhrabe","followers_url":"https://api.github.com/users/marekhrabe/followers","following_url":"https://api.github.com/users/marekhrabe/following{/other_user}","gists_url":"https://api.github.com/users/marekhrabe/gists{/gist_id}","starred_url":"https://api.github.com/users/marekhrabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marekhrabe/subscriptions","organizations_url":"https://api.github.com/users/marekhrabe/orgs","repos_url":"https://api.github.com/users/marekhrabe/repos","events_url":"https://api.github.com/users/marekhrabe/events{/privacy}","received_events_url":"https://api.github.com/users/marekhrabe/received_events","type":"User","site_admin":false},"labels":[{"id":316734152,"url":"https://api.github.com/repos/Automattic/wp-desktop/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"astralbodies","id":373903,"avatar_url":"https://avatars2.githubusercontent.com/u/373903?v=3","gravatar_id":"","url":"https://api.github.com/users/astralbodies","html_url":"https://github.com/astralbodies","followers_url":"https://api.github.com/users/astralbodies/followers","following_url":"https://api.github.com/users/astralbodies/following{/other_user}","gists_url":"https://api.github.com/users/astralbodies/gists{/gist_id}","starred_url":"https://api.github.com/users/astralbodies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astralbodies/subscriptions","organizations_url":"https://api.github.com/users/astralbodies/orgs","repos_url":"https://api.github.com/users/astralbodies/repos","events_url":"https://api.github.com/users/astralbodies/events{/privacy}","received_events_url":"https://api.github.com/users/astralbodies/received_events","type":"User","site_admin":false},"assignees":[{"login":"astralbodies","id":373903,"avatar_url":"https://avatars2.githubusercontent.com/u/373903?v=3","gravatar_id":"","url":"https://api.github.com/users/astralbodies","html_url":"https://github.com/astralbodies","followers_url":"https://api.github.com/users/astralbodies/followers","following_url":"https://api.github.com/users/astralbodies/following{/other_user}","gists_url":"https://api.github.com/users/astralbodies/gists{/gist_id}","starred_url":"https://api.github.com/users/astralbodies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astralbodies/subscriptions","organizations_url":"https://api.github.com/users/astralbodies/orgs","repos_url":"https://api.github.com/users/astralbodies/repos","events_url":"https://api.github.com/users/astralbodies/events{/privacy}","received_events_url":"https://api.github.com/users/astralbodies/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2017-06-16T12:32:07Z","updated_at":"2017-06-19T11:07:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-desktop/pulls/308","html_url":"https://github.com/Automattic/wp-desktop/pull/308","diff_url":"https://github.com/Automattic/wp-desktop/pull/308.diff","patch_url":"https://github.com/Automattic/wp-desktop/pull/308.patch"},"body":"This PR allows us to show preview even for sites that send `x-frame-options: sameorigin` or even `deny`. \r\n\r\nThis header can be present on some Jetpack sites with plugins like this (https://wordpress.org/plugins/http-headers/) or the header can also be set in the code of some themes. Previously, loading of such site lead to the error with error code `NaN` and you had to restart the app in order to use Calypso again.\r\n\r\nThe header is not stripped on the server but rather on the network level inside of the Electron app thus we are not lowering the security of the site on the internet.\r\n\r\nTo test:\r\n- have a jetpack site with plugin above mentioned\r\n- in wp-admin, go to settings and enable `x-frame-options` to sameorigin\r\n- test \"Preview\" functionality in the app"},"comment":{"url":"https://api.github.com/repos/Automattic/wp-desktop/issues/comments/309408920","html_url":"https://github.com/Automattic/wp-desktop/pull/308#issuecomment-309408920","issue_url":"https://api.github.com/repos/Automattic/wp-desktop/issues/308","id":309408920,"user":{"login":"marekhrabe","id":156676,"avatar_url":"https://avatars0.githubusercontent.com/u/156676?v=3","gravatar_id":"","url":"https://api.github.com/users/marekhrabe","html_url":"https://github.com/marekhrabe","followers_url":"https://api.github.com/users/marekhrabe/followers","following_url":"https://api.github.com/users/marekhrabe/following{/other_user}","gists_url":"https://api.github.com/users/marekhrabe/gists{/gist_id}","starred_url":"https://api.github.com/users/marekhrabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marekhrabe/subscriptions","organizations_url":"https://api.github.com/users/marekhrabe/orgs","repos_url":"https://api.github.com/users/marekhrabe/repos","events_url":"https://api.github.com/users/marekhrabe/events{/privacy}","received_events_url":"https://api.github.com/users/marekhrabe/received_events","type":"User","site_admin":false},"created_at":"2017-06-19T11:07:37Z","updated_at":"2017-06-19T11:07:37Z","body":"It seems we have a different starting point. My Jetpack site preview doesn't open externally but tries to load inside of the WebPreview modal and it leads to this screen:\r\n\r\n![preview](https://user-images.githubusercontent.com/156676/27282325-c2c89ef8-54ef-11e7-9e94-9a18fed6be17.gif)\r\n\r\nI don't really know why our websites behave differently. I know we have a flag `isPreviewable` on site object but I'm not sure what goes into determining that flag. Do you have https? My site is wpsandbox.me - yours?"}}
{"actor":{"display_login":"marekhrabe"}}