{"action":"created","issue":{"url":"https://api.github.com/repos/lampeh/libvmod-geoip/issues/10","labels_url":"https://api.github.com/repos/lampeh/libvmod-geoip/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/lampeh/libvmod-geoip/issues/10/comments","events_url":"https://api.github.com/repos/lampeh/libvmod-geoip/issues/10/events","html_url":"https://github.com/lampeh/libvmod-geoip/issues/10","id":75743168,"number":10,"title":"missing headers","user":{"login":"intelbg","id":12134584,"avatar_url":"https://avatars.githubusercontent.com/u/12134584?v=3","gravatar_id":"","url":"https://api.github.com/users/intelbg","html_url":"https://github.com/intelbg","followers_url":"https://api.github.com/users/intelbg/followers","following_url":"https://api.github.com/users/intelbg/following{/other_user}","gists_url":"https://api.github.com/users/intelbg/gists{/gist_id}","starred_url":"https://api.github.com/users/intelbg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intelbg/subscriptions","organizations_url":"https://api.github.com/users/intelbg/orgs","repos_url":"https://api.github.com/users/intelbg/repos","events_url":"https://api.github.com/users/intelbg/events{/privacy}","received_events_url":"https://api.github.com/users/intelbg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-12T21:20:55Z","updated_at":"2015-05-13T10:38:33Z","closed_at":null,"body":"Hello, I compiled the module on varnish 3 with the 3 branch and everything is included as I have the following:\r\n\r\n sub vcl_recv {\r\n set req.http.X-Country-Code = geoip.client_country_code();\r\n\r\nI have installeg mod_geoip, geoip + geoip-devel, but in the browser there isn't X-GEOIP header. Should I see this header another or is there any other config I should done? How to test the module and how can I block country? Is it must in /etc/sysconfig/varnish to run it with mod_geoip and how, because from the reading until now everything didn't work.\r\n\r\nThank you in advance."},"comment":{"url":"https://api.github.com/repos/lampeh/libvmod-geoip/issues/comments/101619438","html_url":"https://github.com/lampeh/libvmod-geoip/issues/10#issuecomment-101619438","issue_url":"https://api.github.com/repos/lampeh/libvmod-geoip/issues/10","id":101619438,"user":{"login":"intelbg","id":12134584,"avatar_url":"https://avatars.githubusercontent.com/u/12134584?v=3","gravatar_id":"","url":"https://api.github.com/users/intelbg","html_url":"https://github.com/intelbg","followers_url":"https://api.github.com/users/intelbg/followers","following_url":"https://api.github.com/users/intelbg/following{/other_user}","gists_url":"https://api.github.com/users/intelbg/gists{/gist_id}","starred_url":"https://api.github.com/users/intelbg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intelbg/subscriptions","organizations_url":"https://api.github.com/users/intelbg/orgs","repos_url":"https://api.github.com/users/intelbg/repos","events_url":"https://api.github.com/users/intelbg/events{/privacy}","received_events_url":"https://api.github.com/users/intelbg/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T10:38:33Z","updated_at":"2015-05-13T10:38:33Z","body":"Ok, I solved my problem and explain it here. The headers you can not see in the browser but in:\r\n\r\nvarnishlog | grep -i X-Country-Code\r\n\r\nTo block a country you should have the following:\r\n\r\n sub vcl_recv {\r\n set req.http.X-Country-Code = geoip.client_country_code();\r\n if (req.http.X-Country-Code ~ \"BG\") {\r\n    error 503 \"Your country has been blocked.\";\r\n  }\r\n\r\nI mark the case as solved\r\n"}}