{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/clair/issues/85","repository_url":"https://api.github.com/repos/coreos/clair","labels_url":"https://api.github.com/repos/coreos/clair/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/coreos/clair/issues/85/comments","events_url":"https://api.github.com/repos/coreos/clair/issues/85/events","html_url":"https://github.com/coreos/clair/pull/85","id":137804554,"number":85,"title":"Allow host","user":{"login":"keloyang","id":11223367,"avatar_url":"https://avatars.githubusercontent.com/u/11223367?v=3","gravatar_id":"","url":"https://api.github.com/users/keloyang","html_url":"https://github.com/keloyang","followers_url":"https://api.github.com/users/keloyang/followers","following_url":"https://api.github.com/users/keloyang/following{/other_user}","gists_url":"https://api.github.com/users/keloyang/gists{/gist_id}","starred_url":"https://api.github.com/users/keloyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keloyang/subscriptions","organizations_url":"https://api.github.com/users/keloyang/orgs","repos_url":"https://api.github.com/users/keloyang/repos","events_url":"https://api.github.com/users/keloyang/events{/privacy}","received_events_url":"https://api.github.com/users/keloyang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Quentin-M","id":1332289,"avatar_url":"https://avatars.githubusercontent.com/u/1332289?v=3","gravatar_id":"","url":"https://api.github.com/users/Quentin-M","html_url":"https://github.com/Quentin-M","followers_url":"https://api.github.com/users/Quentin-M/followers","following_url":"https://api.github.com/users/Quentin-M/following{/other_user}","gists_url":"https://api.github.com/users/Quentin-M/gists{/gist_id}","starred_url":"https://api.github.com/users/Quentin-M/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quentin-M/subscriptions","organizations_url":"https://api.github.com/users/Quentin-M/orgs","repos_url":"https://api.github.com/users/Quentin-M/repos","events_url":"https://api.github.com/users/Quentin-M/events{/privacy}","received_events_url":"https://api.github.com/users/Quentin-M/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-03-02T08:14:50Z","updated_at":"2016-03-03T19:59:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/coreos/clair/pulls/85","html_url":"https://github.com/coreos/clair/pull/85","diff_url":"https://github.com/coreos/clair/pull/85.diff","patch_url":"https://github.com/coreos/clair/pull/85.patch"},"body":"\"r.Host == allowedHost\" is not available for testing the func of clair when clair and analyze-local-images are not in the same host, and if the fileserver  want clair to access,itshould use RemoteAddr to determine which host can access"},"comment":{"url":"https://api.github.com/repos/coreos/clair/issues/comments/191937179","html_url":"https://github.com/coreos/clair/pull/85#issuecomment-191937179","issue_url":"https://api.github.com/repos/coreos/clair/issues/85","id":191937179,"user":{"login":"Quentin-M","id":1332289,"avatar_url":"https://avatars.githubusercontent.com/u/1332289?v=3","gravatar_id":"","url":"https://api.github.com/users/Quentin-M","html_url":"https://github.com/Quentin-M","followers_url":"https://api.github.com/users/Quentin-M/followers","following_url":"https://api.github.com/users/Quentin-M/following{/other_user}","gists_url":"https://api.github.com/users/Quentin-M/gists{/gist_id}","starred_url":"https://api.github.com/users/Quentin-M/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quentin-M/subscriptions","organizations_url":"https://api.github.com/users/Quentin-M/orgs","repos_url":"https://api.github.com/users/Quentin-M/repos","events_url":"https://api.github.com/users/Quentin-M/events{/privacy}","received_events_url":"https://api.github.com/users/Quentin-M/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T19:59:06Z","updated_at":"2016-03-03T19:59:06Z","body":"Hi,\r\n\r\nWhat was the r.Host variable set to in your case? What was the difference with r.RemoteAddr? Is that because it does DNS resolution?\r\n\r\nCould we use `net.SplitHostPort(r.RemoteAddr)` instead of `strings.HasPrefix(r.RemoteAddr, ...)`?"}}