{"action":"created","issue":{"url":"https://api.github.com/repos/firehol/netdata/issues/477","repository_url":"https://api.github.com/repos/firehol/netdata","labels_url":"https://api.github.com/repos/firehol/netdata/issues/477/labels{/name}","comments_url":"https://api.github.com/repos/firehol/netdata/issues/477/comments","events_url":"https://api.github.com/repos/firehol/netdata/issues/477/events","html_url":"https://github.com/firehol/netdata/issues/477","id":158144079,"number":477,"title":"dashboard.js - Cross-domain authentication problems","user":{"login":"hhallman","id":32619,"avatar_url":"https://avatars.githubusercontent.com/u/32619?v=3","gravatar_id":"","url":"https://api.github.com/users/hhallman","html_url":"https://github.com/hhallman","followers_url":"https://api.github.com/users/hhallman/followers","following_url":"https://api.github.com/users/hhallman/following{/other_user}","gists_url":"https://api.github.com/users/hhallman/gists{/gist_id}","starred_url":"https://api.github.com/users/hhallman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhallman/subscriptions","organizations_url":"https://api.github.com/users/hhallman/orgs","repos_url":"https://api.github.com/users/hhallman/repos","events_url":"https://api.github.com/users/hhallman/events{/privacy}","received_events_url":"https://api.github.com/users/hhallman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-02T13:43:55Z","updated_at":"2016-06-02T14:13:32Z","closed_at":null,"body":"When deploying NETDATA in one domain and using the charting functionality on another, there are three problems.\r\n\r\n1) The hello ajax-call is made with double / between the deployment resource path:\r\n`https://myhost/mynetdata//hello-resource`\r\n`Init()` needs to call `hello()` with `NETDATA.serverDefault.slice(0, -1)`, or similar, instead of just NETDATA.serverDefault. (hello expects host without trailing /, but serverDefault always has a trailing /)\r\n\r\n2) When drawing and updating charts, jQuery needs the `xhrFields: { withCredentials: true }` option. (Possibly more places)\r\n\r\n3) When loading the font-resource, `/fonts/fontawesome-webfont.woff2?v=4.5.0`, in my case, my browser complains on 403 because the cookies are not sent. The font is loaded from: `/css/font-awesome.min.css`, which is correctly loaded with authentication headers.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/firehol/netdata/issues/comments/223304263","html_url":"https://github.com/firehol/netdata/issues/477#issuecomment-223304263","issue_url":"https://api.github.com/repos/firehol/netdata/issues/477","id":223304263,"user":{"login":"ktsaou","id":2662304,"avatar_url":"https://avatars.githubusercontent.com/u/2662304?v=3","gravatar_id":"","url":"https://api.github.com/users/ktsaou","html_url":"https://github.com/ktsaou","followers_url":"https://api.github.com/users/ktsaou/followers","following_url":"https://api.github.com/users/ktsaou/following{/other_user}","gists_url":"https://api.github.com/users/ktsaou/gists{/gist_id}","starred_url":"https://api.github.com/users/ktsaou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktsaou/subscriptions","organizations_url":"https://api.github.com/users/ktsaou/orgs","repos_url":"https://api.github.com/users/ktsaou/repos","events_url":"https://api.github.com/users/ktsaou/events{/privacy}","received_events_url":"https://api.github.com/users/ktsaou/received_events","type":"User","site_admin":false},"created_at":"2016-06-02T14:13:32Z","updated_at":"2016-06-02T14:13:32Z","body":"Hi,\r\n\r\n1. You are right. I am submitting a PR now. Although no harm is done.\r\n\r\nThe other two are not right. `withCredentials: true` is only required for the registry calls, since this is the only place we use cookies. Charts and static files are public info (no cookies are required).\r\n\r\nTo verify it, I just edited the file  `demosites.html` on my netdata, to fetch `dashboards.js` from `http://registry.my-netdata.io`, and it worked. It downloaded all static files from `registry.my-netdata.io` and charts from all 3 servers on that dashboard are being refreshed properly.\r\n\r\nTried it with chrome and firefox.\r\n\r\nWhich browser are you using?\r\n"}}
{"actor":{"display_login":"ktsaou"}}