How to remove certain cookies from nginx response [closed]
Although you already mentioned that you switched to Varnish to accomplish what you asked for, the correct answer would have been to use the headers-more-nginx-module
which basically allows you the same as the Varnish function does (and much more).