1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-11-24 08:32:23 +02:00

Fix: Origin undefined on error handling (#4224)

This commit is contained in:
Nelson Chan 2023-12-13 01:35:39 +08:00 committed by GitHub
parent 4245ea86e7
commit 4185ec20b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,9 +134,10 @@ class UptimeKumaServer {
log.info("auth", "WebSocket with no origin is allowed");
callback(null, true);
} else {
let host = req.headers.host;
let origin = req.headers.origin;
try {
let host = req.headers.host;
let origin = req.headers.origin;
let originURL = new URL(origin);
let xForwardedFor;
if (await Settings.get("trustProxy")) {