fix(callback_redirect): dont use full url use relative #16

Merged
jon_nfc merged 1 commits from fix-callback-redirect into development 2023-08-19 02:53:42 +00:00
Showing only changes of commit 4f2397a473 - Show all commits

View File

@ -8716,7 +8716,7 @@
"z": "8179bf22c4c31682",
"g": "69f0d6271fe16536",
"name": "Confirm session saved",
"func": "var success = null;\nvar callback = null;\nvar failure = msg;\n\nvar status = { fill: \"red\", shape: \"ring\", text: \"incomplete\"};\n\nvar url = '/auth';\n\nfs.stat(msg.filename, function (err) {\n\n if (err) {\n status.text = \"false\";\n status.fill = \"yellow\";\n\n } else {\n status.text = \"true\";\n status.fill = \"green\";\n\n if (! msg.token_refresh ) {\n\n msg.cookies.auth.value = msg.hash.value;\n msg.headers = {\n Location: \"http://127.0.0.1:1881/\"\n }\n\n msg.statusCode = 302;\n\n callback = msg;\n failure = null;\n\n }else {\n msg.payload = 'Token refresh';\n \n success = msg;\n failure = null;\n }\n \n\n \n\n \n delete msg.hash;\n delete msg.filename;\n delete msg.retry\n delete msg.payload;\n }\n\n node.status(status);\n\n node.send([\n success,\n callback,\n failure\n ]);\n\n})\n\n\n\n",
"func": "var success = null;\nvar callback = null;\nvar failure = msg;\n\nvar status = { fill: \"red\", shape: \"ring\", text: \"incomplete\"};\n\nvar url = '/auth';\n\nfs.stat(msg.filename, function (err) {\n\n if (err) {\n status.text = \"false\";\n status.fill = \"yellow\";\n\n } else {\n status.text = \"true\";\n status.fill = \"green\";\n\n if (! msg.token_refresh ) {\n\n msg.cookies.auth.value = msg.hash.value;\n msg.headers = {\n Location: \"/\"\n }\n\n msg.statusCode = 302;\n\n callback = msg;\n failure = null;\n\n }else {\n msg.payload = 'Token refresh';\n \n success = msg;\n failure = null;\n }\n \n\n \n\n \n delete msg.hash;\n delete msg.filename;\n delete msg.retry\n delete msg.payload;\n }\n\n node.status(status);\n\n node.send([\n success,\n callback,\n failure\n ]);\n\n})\n\n\n\n",
"outputs": 3,
"noerr": 0,
"initialize": "",