**nginx version: `1.10.3`** Here's my code to add 'Set-Cookie' to headers: void add_headers_out(ngx_http_request_t *r, char* cookies) { ngx_table_elt_t *h; ngx_str_t k = ngx_string("Set-Cookie"); ngx_str_t v = ngx_string(cookies); h = ngx_list_push(&r->headers_out.headers); if(h == NULL) { return ;by hcnhcn012 - Nginx Mailing List - English