const minisrv_service_file = true;
let redirect, message;
headers = `200 OK
Content-Type: text/html`;
if (session_data.getSessionData("registered")) {
redirect = [10, "client:goback?"];
message = "Error: Your box is already registered. If you would like to re-register, you must first unregister.";
} else if (request_headers.query.confirm_register) {
headers += `
wtv-noback-all: wtv-
wtv-expire-all: wtv-
wtv-relogin-url: wtv-1800:/preregister?relogin=true
wtv-reconnect-url: wtv-1800:/preregister?reconnect=true
wtv-boot-url: wtv-1800:/preregister?relogin=true`;
redirect = [3, "client:relog?"];
message = "You will now be be redirected to registration.
";
message += `Click here if you are not automatically redirected.`;
} else {
message = `Are you ready to register your box with ${minisrv_config.config.service_name}?