<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12px"><div id="yui_3_16_0_ym19_1_1479620587787_4333"><span id="yui_3_16_0_ym19_1_1479620587787_4332">I was able to do this with the "headers more" module.</span></div><div id="yui_3_16_0_ym19_1_1479620587787_4333"><span><br></span></div><div id="yui_3_16_0_ym19_1_1479620587787_4333"><span>Thanks!</span></div><div id="yui_3_16_0_ym19_1_1479620587787_4333"><span>Yongtao</span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Saturday, November 19, 2016 4:22 PM, Yongtao You via nginx <nginx@nginx.org> wrote:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv0751594820"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12px;"><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006">Hi,</div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006"><br></div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006">I'm setting up a reverse proxy to my backend service as follows:</div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006"><br></div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8287">server {</font></div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><span style="">    location / {</span><br></div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8350">        auth_request /auth;</font></div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8399">        error_page 401 =302 <a rel="nofollow" target="_blank" href="http://localhost/login" id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8385">/login</a>;</font></div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8442">        proxy_pass <a rel="nofollow" target="_blank" href="http://backend/;" id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8486">http://backend/;</a></font></div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8508">        <b id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8528">add_header Set-Cookie "my=xyz"; # Can I add this in the response from backend?</b></font></div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><font face="Courier New, courier, monaco, monospace, sans-serif">    }</font></div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><font face="Courier New, courier, monaco, monospace, sans-serif">}</font></div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><br></div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr">I would like to inject a Set-Cookie header in the response from the backend service. Is that possible? The above does not work.</div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><br></div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr">Thanks.</div><div id="yiv0751594820yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr">Yongtao</div></div></div></div><br>_______________________________________________<br>nginx mailing list<br><a ymailto="mailto:nginx@nginx.org" href="mailto:nginx@nginx.org">nginx@nginx.org</a><br><a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br><br></div>  </div> </div>  </div></div></body></html>