Got it. Updated my last comment for noise. Thank you.
Translate PHP to Node.js
-
I can't get to translate this piece of code to place it in my NodeBB. I'd be thankful if yoy guys can help out!
<? session_set_cookie_params(0, '/', '.site.net'); session_start(); if(!isset($_SESSION["auth_token"])) { $_SESSION["auth_token"] = bin2hex(random_bytes(16)); $full_url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; header("Location: https://secure.site.net/auth/$_SESSION[auth_token]?return_url=".$full_url); } ?>
-
@julian I'm newbie to Node.js, lol so I don't really understand what do I have to do after I enabled the plugin on my NodeBB.
-
@julian thanks, but I do not understand what is that. My webmaster helped me with the PHP code, but I'm not a programmer, and he does not use Node.js.
can you please paste the code conversion so that I can place it in my index.js -
@julian He abandoned me. Please tell me what to do step by step to get something similar. Thanks!