wlan-ap-Telecominfraproject/feeds/ucentral/uspot/files/usr/share/uspot/handler-cpd.uc
Thibaut VARÈNE d667c2e2b9 uspot: correctly honor "debug=0" configs
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2023-05-30 07:56:09 +02:00

14 lines
275 B
Ucode

{%
'use strict';
let uci = require('uci').cursor();
let config = uci.get_all('uspot');
global.handle_request = function(env) {
if (env.REMOTE_ADDR && +config.def_captive.debug)
warn('uspot: ' + env.REMOTE_ADDR + ' - CPD redirect\n');
include('cpd.uc', { env });
};
%}