Hi,
after some further testing I discovered that I had the order in which various nginx config files are called wrong. Because location {} isn't merged, but overridden, my directives never 'took'.
Setting proxy_buffer_size 8k; kept the errors from occurring.
As I wrote on Github https://github.com/jeroenooms/opencpu/issues/76 , it still seems like the error message was misleading here, because the headers sent were identical (except for the exact Content-Length) and the headers received were pretty much the same as well. There are no cookies at all involved here.
Thanks for the advice and nginx!