Nodejs : Redirect URL

后端 未结 5 1452
粉色の甜心
粉色の甜心 2020-12-30 07:37

I\'m trying to redirect the url of my app in node.js in this way:

// response comes from the http server
response.statusCode = 302;
response.setHeader(\"Loca         


        
5条回答
  •  爱一瞬间的悲伤
    2020-12-30 07:52

    This issue may also depend on the type of request you are handling. A POST request cannot be redirected using the header. For example, a first-time visitor from to your app in FB will most-likely be coming via a "signed request" POST and therefore a redirect will not work.

提交回复
热议问题