57 Commits

Author SHA1 Message Date
Alicia Sykes
2bbac3be69 🚚 Move express app out of server.js 2026-04-12 19:02:49 +01:00
Alicia Sykes
4b0e40fac4 Ensure each server request always ends safly/no crash 2026-04-12 17:07:59 +01:00
Alicia Sykes
16f589b403 🥅 Catch any remaining unhandled rejection (#1945, #1935, #1494) 2026-04-11 21:08:51 +01:00
Alicia Sykes
9d597b3230 🛂 Set default userHeader to Remote-User 2026-04-08 09:12:53 +01:00
Alicia Sykes
03a64d7490 🛂 Implements and documents the header auth 2026-04-07 19:48:12 +01:00
Alicia Sykes
e82fde973f 🔐 Adds an admin gate for write endpoints 2026-04-07 13:40:33 +01:00
Alicia Sykes
f77c0f7e6e 🔐 Updates auth credential priority
Previously, if both env vars and appConfig.auth were configured, the
values in conf.yml would take priority. This has now been reversed, since environmental values are more secure. Now BASIC_AUTH_USERNAME, BASIC_AUTH_PASSWORD will take precidence.

Also, added a warning which will show if user attempts to use both
methods (since they will conflict), advising them to delete one.

When basic auth is enabled, all internal endpoints require HTTP basic
auth headers to be sent. Once the user has authenticaed via the UI,
these will be attached automatically. If ENABLE_HTTP_AUTH env var is
unset, then the auth config is basically just a login page rather than
an access control system.
2026-04-07 12:59:36 +01:00
Alicia Sykes
27b3a7289d 🔐 Implements auth check for local endpoints 2026-04-05 22:35:40 +01:00
Alicia Sykes
c07f3dc810 🥅 Handle null headers 2026-03-31 22:20:29 +01:00
Al Saleh
f9c0ff68f7 Send content type header response 2025-07-21 07:04:00 +02:00
Al Saleh
806db58be6 send json response for status check 2025-07-19 11:40:50 +02:00
Alicia Sykes
85de40d950 🛂 Adds option for env vars for passwords 2024-04-28 15:08:05 +01:00
Alicia Sykes
99643acddf 🛂 Adds support for HTTP authorization 2024-04-27 23:16:56 +01:00
Alicia Sykes
6a6fcd4be9 Set IS_SERVER 2024-04-18 23:08:50 +01:00
Alicia Sykes
88498d3887 Reordered endpoint priority in server entrypoint 2024-04-15 21:08:56 +01:00
Alicia Sykes
4d851b6e86 Lint and port update 2024-04-13 12:35:21 +01:00
Alicia Sykes
b66ce53669 📡 Make user-data directory configurable 2024-04-10 22:59:35 +01:00
Alicia Sykes
041e5d8c28 🔂 Merge master into branch 2024-03-30 21:35:46 +00:00
Alicia Sykes
27995f8500 👔 Use a 404 status code if page not found (fixes #1136) 2024-02-28 11:57:25 +00:00
Todd E Johnson
27dfe6219a Make userHeader pull from config 2023-11-23 00:02:08 -06:00
Todd E Johnson
4aa34f66dc WIP: Attempt at adding header auth. Ignore Settings #981 2023-11-17 00:00:48 -06:00
Alicia Sykes
4813d49e42 ⤴ Rebased from master 2023-06-11 11:30:55 +01:00
itsmejoeeey
12eadccfda 🐛 Serve index.html as fallback to fix #1067 2023-01-17 01:30:34 +13:00
Alicia Sykes
c0836acc5e 😆 Change order of served up files, fixes everything :) 2022-09-25 19:44:40 +01:00
Alicia Sykes
cdf1bb9529 🚧 WIP 2022-08-19 10:04:38 +01:00
PlusaN
f700f31904 Add HOST environment
This is necessary in order to override which IP the Dashy process will bind to.
2022-05-22 00:58:59 +03:00
Alicia Sykes
a0ac7979e4 Put the initialization screen back in 2022-04-27 20:45:21 +01:00
aterox
6ee5286ebf Add redirection from http to https 2022-03-07 05:54:45 -05:00
aterox
727f6b1fc0 Get conf.yml on client side 2022-03-06 03:04:41 -05:00
aterox
aeec449dc7 Pull conf.yml from server 2022-03-05 01:22:12 -05:00
Alicia Sykes
e5ccdd9e97 🥅 Adds try catch to server welcome msg (#477) 2022-02-07 15:55:35 +00:00
Alicia Sykes
676d1cb106 Writes a CORS proxy, to secure widget requests 2021-12-19 20:05:15 +00:00
Alicia Sykes
e0b09d48ee Adds widget to fetch and display system stats 2021-12-16 04:03:36 +00:00
Alicia Sykes
3593721fd7 🔒 Adds support for native SSL 2021-11-09 22:40:57 +00:00
Alicia Sykes
3e465ae7c6 Displays initialization screen while app building 2021-11-08 20:17:48 +00:00
Alicia Sykes
1bc978b704 🔥 Replaces serve-static, connect and body-parser with express 2021-11-08 19:31:28 +00:00
Alicia Sykes
fffa2319c1 Implements router history mode, for cleaner URLs 2021-10-13 20:02:13 +01:00
Alicia Sykes
a8f7df4544 🔥 Removes ping-only check, accidental commit 2021-09-18 18:25:20 +01:00
Alicia Sykes
7272749325 Creates an endpoint to run ping-only status check 2021-09-17 23:51:02 +01:00
Alicia Sykes
f0449969e7 Use constants for API endpoints 2021-09-17 22:40:39 +01:00
Alicia Sykes
bd1723237a 🚚 Updates validator path, adds version checker script 2021-07-25 17:43:47 +01:00
Alicia Sykes
b0d5b63703 Adds an endpoint for rebuilding the app, so that it can be triggered from the UI 2021-06-19 19:21:32 +01:00
Alicia Sykes
760c464c19 Got the save config route working in the node server 2021-06-19 13:47:10 +01:00
Alicia Sykes
77ca662f37 Adds server endpoint for backing up and saving conf.yml. Still needs some improvments though. 2021-06-18 18:01:42 +01:00
Alicia Sykes
856b9eb3c6 Refactors the main server.js, and moves welcome msg to separate file 2021-06-18 14:14:31 +01:00
Alicia Sykes
1a64b54046 Wrote server functions for checking uptime 2021-06-14 20:42:02 +01:00
Alicia Sykes
28650b7e6d FIX: Port is not correctly read
Missing brackets in server.js (L15) was causing the port to not be read from ENV varaiable PORT correctly, effectively breaking deployment builds. Bloody JavaScript...
2021-06-11 20:42:32 +01:00
Alicia Sykes
dbc2fae6d6 Fixed lint errors caused by octal character, and added missing yaml dependency 2021-06-11 15:23:25 +01:00
Alicia Sykes
dbfbcf3284 Implements docker container healthchecks 2021-06-10 19:46:46 +01:00
Alicia Sykes
7d5a99d9d3 Calls config validator when serve starts, and adds documentation in readme 2021-06-05 20:21:15 +01:00