<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_1479600567884_8006">Hi,</div><div id="yui_3_16_0_ym19_1_1479600567884_8006"><br></div><div id="yui_3_16_0_ym19_1_1479600567884_8006">I'm setting up a reverse proxy to my backend service as follows:</div><div id="yui_3_16_0_ym19_1_1479600567884_8006"><br></div><div id="yui_3_16_0_ym19_1_1479600567884_8006"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yui_3_16_0_ym19_1_1479600567884_8287">server {</font></div><div id="yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><span style="font-family: "Courier New", courier, monaco, monospace, sans-serif;"> location / {</span><br></div><div id="yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yui_3_16_0_ym19_1_1479600567884_8350"> auth_request /auth;</font></div><div id="yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yui_3_16_0_ym19_1_1479600567884_8399"> error_page 401 =302 <a href="http://localhost/login" id="yui_3_16_0_ym19_1_1479600567884_8385">/login</a>;</font></div><div id="yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yui_3_16_0_ym19_1_1479600567884_8442"> proxy_pass <a href="http://backend/;" id="yui_3_16_0_ym19_1_1479600567884_8486">http://backend/;</a></font></div><div id="yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yui_3_16_0_ym19_1_1479600567884_8508"> <b id="yui_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="yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><font face="Courier New, courier, monaco, monospace, sans-serif"> }</font></div><div id="yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><font face="Courier New, courier, monaco, monospace, sans-serif">}</font></div><div id="yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><br></div><div id="yui_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="yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr">Thanks.</div><div id="yui_3_16_0_ym19_1_1479600567884_8006" dir="ltr">Yongtao</div></div></body></html>