Fix atob issue when xff is undefined

Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
yubiuser
2024-09-22 22:42:21 +02:00
parent 32f8986160
commit a01018b9b6

View File

@@ -714,7 +714,7 @@ function addAdvancedInfo() {
const advancedInfoTarget = $("#advanced-info");
const isTLS = advancedInfoSource.data("tls");
const clientIP = advancedInfoSource.data("client-ip");
const XForwardedFor = window.atob(advancedInfoSource.data("xff"));
const XForwardedFor = window.atob(advancedInfoSource.data("xff") ?? "");
const starttime = parseFloat(advancedInfoSource.data("starttime"));
const endtime = parseFloat(advancedInfoSource.data("endtime"));
const totaltime = 1e3 * (endtime - starttime);