{"action":"created","issue":{"url":"https://api.github.com/repos/indutny/bud/issues/73","labels_url":"https://api.github.com/repos/indutny/bud/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/indutny/bud/issues/73/comments","events_url":"https://api.github.com/repos/indutny/bud/issues/73/events","html_url":"https://github.com/indutny/bud/issues/73","id":95250890,"number":73,"title":"Bud sends no X-Forwarded-For for a portion of the Chrome requests","user":{"login":"phillipp","id":766631,"avatar_url":"https://avatars.githubusercontent.com/u/766631?v=3","gravatar_id":"","url":"https://api.github.com/users/phillipp","html_url":"https://github.com/phillipp","followers_url":"https://api.github.com/users/phillipp/followers","following_url":"https://api.github.com/users/phillipp/following{/other_user}","gists_url":"https://api.github.com/users/phillipp/gists{/gist_id}","starred_url":"https://api.github.com/users/phillipp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillipp/subscriptions","organizations_url":"https://api.github.com/users/phillipp/orgs","repos_url":"https://api.github.com/users/phillipp/repos","events_url":"https://api.github.com/users/phillipp/events{/privacy}","received_events_url":"https://api.github.com/users/phillipp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-15T17:45:56Z","updated_at":"2015-07-15T23:43:05Z","closed_at":null,"body":"We have a working bud setup now but we are seeing some connections where the first requests don't have an X-Forwarded-For header.\r\n\r\nThis very rare but breaks quite a lot of stuff when it happens.\r\n\r\nSetup is a \"normal\" bud setup on 1.2.4 and a nginx-lua backend that reads and sets the X-Forwarded-For header into a SHM dictionary on the first request. To make sure we don't miss the first request we added a \"seen\" key that is set on the first request of the connection. We additionally dump all headers.\r\n\r\nAfter a while I noticed that I can't reproduce with curl or Firefox, only in chrome. The headers confirmed that only chrome (like Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36) is affected.\r\nAccept-Encoding is always \"gzip, deflate, sdch\" (maybe helpful?), and we strip the Accept-Encoding at the nginx layer because of legacy system behaviour.\r\n\r\nReproduction is simple: just hit F5 a few times in chrome and on a few requests the IP is not set.\r\n\r\nAny ideas?"},"comment":{"url":"https://api.github.com/repos/indutny/bud/issues/comments/121777050","html_url":"https://github.com/indutny/bud/issues/73#issuecomment-121777050","issue_url":"https://api.github.com/repos/indutny/bud/issues/73","id":121777050,"user":{"login":"thomasba","id":1319423,"avatar_url":"https://avatars.githubusercontent.com/u/1319423?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasba","html_url":"https://github.com/thomasba","followers_url":"https://api.github.com/users/thomasba/followers","following_url":"https://api.github.com/users/thomasba/following{/other_user}","gists_url":"https://api.github.com/users/thomasba/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasba/subscriptions","organizations_url":"https://api.github.com/users/thomasba/orgs","repos_url":"https://api.github.com/users/thomasba/repos","events_url":"https://api.github.com/users/thomasba/events{/privacy}","received_events_url":"https://api.github.com/users/thomasba/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T23:43:05Z","updated_at":"2015-07-15T23:43:05Z","body":"There is only one backend (a nginx server, so bud only handles the ssl stuff). The configuration:\r\n\r\n```json\r\n  \"backend\": [{\r\n    \"port\": 10010,\r\n    \"host\": \"127.0.0.1\",\r\n    \"keepalive\": 3600,\r\n    \"x-forward\": true\r\n  }],\r\n```"}}