mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 14:54:05 +00:00
Fix: Origin undefined on error handling (#4224)
This commit is contained in:
parent
4245ea86e7
commit
4185ec20b0
1 changed files with 3 additions and 2 deletions
|
@ -134,9 +134,10 @@ class UptimeKumaServer {
|
||||||
log.info("auth", "WebSocket with no origin is allowed");
|
log.info("auth", "WebSocket with no origin is allowed");
|
||||||
callback(null, true);
|
callback(null, true);
|
||||||
} else {
|
} else {
|
||||||
|
let host = req.headers.host;
|
||||||
|
let origin = req.headers.origin;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let host = req.headers.host;
|
|
||||||
let origin = req.headers.origin;
|
|
||||||
let originURL = new URL(origin);
|
let originURL = new URL(origin);
|
||||||
let xForwardedFor;
|
let xForwardedFor;
|
||||||
if (await Settings.get("trustProxy")) {
|
if (await Settings.get("trustProxy")) {
|
||||||
|
|
Loading…
Reference in a new issue