I am facing similar issue wherein nginx throws 412 for If-Match even when response header etag value matches it for a GET request.
Also request is being handled via X-Accel-Redirect flow having few hops
Here's sample debug error log for clue
2017/01/31 20:55:28 [debug] 795#0: *6 http upstream process header
2017/01/31 20:55:28 [debug] 795#0: *6 malloc: 0000000002389820:32768
2017/01/31 20:55:28 [debug] 795#0: *6 recv: fd:14 18000 of 32524
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy status 200 "200 OK"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header: "Server: Apache-Coyote/1.1"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header: "Accept-Ranges: bytes"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header: "Content-Length: 17509641"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header: "Date: Tue, 31 Jan 2017 15:25:28 GMT"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header: "Connection: close"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header done
2017/01/31 20:55:28 [debug] 795#0: *6 http special response: 412, "/get-redirect?
2017/01/31 20:55:28 [debug] 795#0: *6 headers more header filter, uri "/get-redirect"
2017/01/31 20:55:28 [debug] 795#0: *6 posix_memalign: 000000000235DB20:4096 @16
2017/01/31 20:55:28 [debug] 795#0: *6 HTTP/1.1 412 Precondition Failed
Server: nginx/1.8.0
Date: Tue, 31 Jan 2017 15:25:28 GMT
Content-Type: text/html
Content-Length: 188
Connection: keep-alive
Also request is being handled via X-Accel-Redirect flow having few hops
Here's sample debug error log for clue
2017/01/31 20:55:28 [debug] 795#0: *6 http upstream process header
2017/01/31 20:55:28 [debug] 795#0: *6 malloc: 0000000002389820:32768
2017/01/31 20:55:28 [debug] 795#0: *6 recv: fd:14 18000 of 32524
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy status 200 "200 OK"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header: "Server: Apache-Coyote/1.1"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header: "Accept-Ranges: bytes"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header: "Content-Length: 17509641"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header: "Date: Tue, 31 Jan 2017 15:25:28 GMT"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header: "Connection: close"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header done
2017/01/31 20:55:28 [debug] 795#0: *6 http special response: 412, "/get-redirect?
2017/01/31 20:55:28 [debug] 795#0: *6 headers more header filter, uri "/get-redirect"
2017/01/31 20:55:28 [debug] 795#0: *6 posix_memalign: 000000000235DB20:4096 @16
2017/01/31 20:55:28 [debug] 795#0: *6 HTTP/1.1 412 Precondition Failed
Server: nginx/1.8.0
Date: Tue, 31 Jan 2017 15:25:28 GMT
Content-Type: text/html
Content-Length: 188
Connection: keep-alive