I used AWS API Gateway to redirect in response.
<em>simple flow</em> :
aaa.com ====> API Gateway & Lambda ==[302 redirect]==> <em>bbb.com</em>
It worked well when following <a href="https://rpgreen.wordpress.com/2016/01/04/how-to-http-redirects-with-api-gateway-and-lambda/" rel="nofollow">the blog</a>. However, I couldn't set cookie at <em>bbb.com</em>.
I followed the blog and defined another “Set-Cookie” header. My Lambda code snippet listed below.
<em>simple flow</em> :
aaa.com ====> API Gateway & Lambda ==[302 redirect]==> <em>bbb.com</em>
It worked well when following <a href="https://rpgreen.wordpress.com/2016/01/04/how-to-http-redirects-with-api-gateway-and-lambda/" rel="nofollow">the blog</a>. However, I couldn't set cookie at <em>bbb.com</em>.
I followed the blog and defined another “Set-Cookie” header. My Lambda code snippet listed below.
Code:
context.succeed({
location : "http://192.168.173.193:3030",
setCookie: "path=/;sessionID=1234;domain=null;"
});