Fix: Origin undefined on error handling (#4224)

pull/4226/head^2
Nelson Chan 12 months ago committed by GitHub
parent 4245ea86e7
commit 4185ec20b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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")) {

Loading…
Cancel
Save