{"action":"opened","issue":{"url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1062","labels_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1062/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1062/comments","events_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1062/events","html_url":"https://github.com/ethereum/cpp-ethereum/issues/1062","id":57736271,"number":1062,"title":"CORS problems","user":{"login":"davidhq","id":3899,"avatar_url":"https://avatars.githubusercontent.com/u/3899?v=3","gravatar_id":"","url":"https://api.github.com/users/davidhq","html_url":"https://github.com/davidhq","followers_url":"https://api.github.com/users/davidhq/followers","following_url":"https://api.github.com/users/davidhq/following{/other_user}","gists_url":"https://api.github.com/users/davidhq/gists{/gist_id}","starred_url":"https://api.github.com/users/davidhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidhq/subscriptions","organizations_url":"https://api.github.com/users/davidhq/orgs","repos_url":"https://api.github.com/users/davidhq/repos","events_url":"https://api.github.com/users/davidhq/events{/privacy}","received_events_url":"https://api.github.com/users/davidhq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-15T16:41:40Z","updated_at":"2015-02-15T16:41:40Z","closed_at":null,"body":"Hi,\r\n\r\nWe run `eth` client like this: `eth -j -m 10 -n off --json-rpc-port 8090`\r\n\r\nThen from JS:\r\n`web3.setProvider(new web3.providers.HttpSyncProvider('http://localhost:8090'));`\r\n\r\nServer for the webapp is on port `8888`.\r\n\r\nBrowser of course reports:\r\n\r\n```\r\n[Error] XMLHttpRequest cannot load http://localhost:8090/. Origin http://0.0.0.0:8888 is not allowed by Access-Control-Allow-Origin.\r\n\tsend (ethereum.min.js, line 1)\r\n\to (ethereum.min.js, line 1)\r\n\t(anonymous function) (ethereum.min.js, line 1)\r\n\tcreateContract (etherstarter_create.html, line 21)\r\n\t(anonymous function) (etherstarter_create.html, line 34)\r\n\tdispatch (jquery-2.1.3.min.js, line 3)\r\n\thandle (jquery-2.1.3.min.js, line 3)\r\n```\r\n\r\nI made a node server that proxies /client requests to eth (`localhost:8888/client` goes to port 8090), \r\n\r\nServer is here: https://gist.github.com/davidhq/17f459fc9972f47a45d8\r\n\r\nEth endpoint is referenced like this: `web3.setProvider(new web3.providers.HttpSyncProvider('http://localhost:8888/client'));`\r\n\r\nMy question: is this the most optimal solution or can eth server set CORS headers etc?"}}