--[[ * Pi-hole: A black hole for Internet advertisements * (c) 2017 Pi-hole, LLC (https://pi-hole.net) * Network-wide ad blocking via your own hardware. * * This file is copyright under the latest version of the EUPL. * Please see LICENSE file for your rights under this license. * ]]-- -- Iterate over the array mg.request_info.http_headers and check if there is an 'X-Forwarded-For' header x_forwarded_for = "" for k,v in pairs(mg.request_info.http_headers) do if k:lower() == "x-forwarded-for" then x_forwarded_for = mg.base64_encode(v) break end end ?>