Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

🩹 Small fix to prevent harmless error when no user

Alicia Sykesaceb4ee47ee1
diff --git a/services/get-user.js b/services/get-user.js
index 4d10ccdd..12055365 100644
--- a/services/get-user.js
+++ b/services/get-user.js
@@ -1,6 +1,6 @@
module.exports = (config, req) => {
try {
- if (config.appConfig.auth.enableHeaderAuth) {
+ if (config.appConfig?.auth?.enableHeaderAuth) {
const { userHeader } = config.appConfig.auth.headerAuth;
const { proxyWhitelist } = config.appConfig.auth.headerAuth;
if (proxyWhitelist.includes(req.socket.remoteAddress)) {