{"action":"created","issue":{"url":"https://api.github.com/repos/atom/electron/issues/5007","repository_url":"https://api.github.com/repos/atom/electron","labels_url":"https://api.github.com/repos/atom/electron/issues/5007/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/5007/comments","events_url":"https://api.github.com/repos/atom/electron/issues/5007/events","html_url":"https://github.com/atom/electron/issues/5007","id":145550986,"number":5007,"title":"Is there a way to forward requests from file:// to http://","user":{"login":"rittbys","id":5205015,"avatar_url":"https://avatars.githubusercontent.com/u/5205015?v=3","gravatar_id":"","url":"https://api.github.com/users/rittbys","html_url":"https://github.com/rittbys","followers_url":"https://api.github.com/users/rittbys/followers","following_url":"https://api.github.com/users/rittbys/following{/other_user}","gists_url":"https://api.github.com/users/rittbys/gists{/gist_id}","starred_url":"https://api.github.com/users/rittbys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rittbys/subscriptions","organizations_url":"https://api.github.com/users/rittbys/orgs","repos_url":"https://api.github.com/users/rittbys/repos","events_url":"https://api.github.com/users/rittbys/events{/privacy}","received_events_url":"https://api.github.com/users/rittbys/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-03T23:11:47Z","updated_at":"2016-04-04T16:25:51Z","closed_at":null,"body":"* Electron version: 0.37.4\r\n* Operating system: Windows 10 (but this is relevant to all)\r\n\r\nHi, my Electron program calls the YouTube API quite frequently, but the problem is that it seems to look for several files in a directory where they don't exist. This is probably due to the API code using relative paths somewhere. Is there a way that I can redirect those specific requests to http:// instead of file://? Thanks!\r\n![capture](https://cloud.githubusercontent.com/assets/5205015/14235555/7ec4b720-f9c7-11e5-81bc-3ba7ce43addf.PNG)\r\n\r\n\r\n\r\nEDIT: The reason this is important is that it causes the whole javascript to completely freeze for a good ten seconds, then reload some of the elements that the user has been interacting with. My code: http://github.com/rittbys/YouTubeDesktop"},"comment":{"url":"https://api.github.com/repos/atom/electron/issues/comments/205376161","html_url":"https://github.com/atom/electron/issues/5007#issuecomment-205376161","issue_url":"https://api.github.com/repos/atom/electron/issues/5007","id":205376161,"user":{"login":"MarshallOfSound","id":6634592,"avatar_url":"https://avatars.githubusercontent.com/u/6634592?v=3","gravatar_id":"","url":"https://api.github.com/users/MarshallOfSound","html_url":"https://github.com/MarshallOfSound","followers_url":"https://api.github.com/users/MarshallOfSound/followers","following_url":"https://api.github.com/users/MarshallOfSound/following{/other_user}","gists_url":"https://api.github.com/users/MarshallOfSound/gists{/gist_id}","starred_url":"https://api.github.com/users/MarshallOfSound/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarshallOfSound/subscriptions","organizations_url":"https://api.github.com/users/MarshallOfSound/orgs","repos_url":"https://api.github.com/users/MarshallOfSound/repos","events_url":"https://api.github.com/users/MarshallOfSound/events{/privacy}","received_events_url":"https://api.github.com/users/MarshallOfSound/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T16:25:51Z","updated_at":"2016-04-04T16:25:51Z","body":"This might be a viable solution https://github.com/atom/electron/blob/master/docs/api/protocol.md#protocolregisterhttpprotocolscheme-handler-completion\r\n\r\nOr you could host a mini HTTP server inside your app, something small and lightweight like https://github.com/cloudhead/node-static"}}