I want to add remote ip as a Cookie in Nginx, so that it can be passed on to AWS Load Balancer for Load balancer stickiness.
location / {
proxy_set_header Cookie "$http_cookie; ip=$remote_addr";
proxy_pass http://app_upstream;
}
I am using these to set the cookie, but AWS ELB is not accepting this as stickiness. Since this server is used as an iframe, I can't use ELB generated cookie for load balancing in case of Safari/iOs which block 3rd party cookies by default.
I am open to ditching nginx and writing a custom reverse proxy as well.