Skip to content

Commit

Permalink
Fix: Origin undefined on error handling (louislam#4224)
Browse files Browse the repository at this point in the history
  • Loading branch information
chakflying authored Dec 12, 2023
1 parent 4245ea8 commit 4185ec2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/uptime-kuma-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down

0 comments on commit 4185ec2

Please sign in to comment.