Score:0

Nginx not returned cookie from proxy

br flag

I have an authentication server, that return an id Cookie that should be used by the client for the followed request, but the nginx proxy don't return the id cookie to the client over the proxy.

   location /cim/session/api/ {
   proxy_set_header Host $host;
   proxy_set_header X-Real-IP $remote_addr;
   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
   proxy_set_header X-NginX-Proxy true;
   proxy_set_header Cookie $http_cookie;
   proxy_pass_request_headers      on;
   proxy_pass http://session-server.domain.com:8764/api/;
   proxy_ssl_session_reuse off;
   proxy_cache_bypass $http_upgrade;
   proxy_redirect off;
   content_by_lua_block {
     ngx.req.read_body()
     ngx.req.set_body_data('{ "username":"blabla",  "password":"blabla"}')
   }
   return 201;
 }
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.