Server: Add host whitelisting (#4476)

* Add host whitelisting middleware

* Add prompt to enable hostWhitelist

* perf: Freeze config array

* Update src/middleware/hostWhitelist.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* perf: Add max known hosts limit

* Add validation warning disable hint

* Add conditional host whitelist middleware based on SSL configuration

* Check for cache exhaustion before logging

* Revert "Add conditional host whitelist middleware based on SSL configuration"

This reverts commit 968104c6f4f2e4b72e1fd8ceff0a4b0ded216d69.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Cohee
2025-09-04 20:52:23 +03:00
committed by GitHub
parent e871886b13
commit d134abd50e
6 changed files with 95 additions and 0 deletions
+1
View File
@@ -54,6 +54,7 @@
"handlebars": "^4.7.8",
"helmet": "^8.1.0",
"highlight.js": "^11.11.1",
"host-validation-middleware": "^0.1.1",
"html-entities": "^2.6.0",
"iconv-lite": "^0.6.3",
"ip-matching": "^2.1.2",