diff options
author | Tom Smeding <tom@tomsmeding.com> | 2025-07-17 15:31:53 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2025-07-17 15:31:53 +0200 |
commit | da4c0dcf83560bf54be8b635b7de6fce607c56ce (patch) | |
tree | 0dcffb47de62afb8a39dfe06462307dd932969ac | |
parent | 8bb825e24957856d40c2647b0e1c57f8d35a66b6 (diff) |
-rwxr-xr-x | webserver.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/webserver.js b/webserver.js index ec5575c..c3f805a 100755 --- a/webserver.js +++ b/webserver.js @@ -208,7 +208,9 @@ function anyComponentHidden(fname) { function requestFile(req, res, path, origpath, options) { if (options == null) options = {}; fname = cmn.webfilesdir + path; - console.log("Requesting file " + fname); + // Prevent log spam from the crowd all wanting to know who we are + if (path != "/well-known/matrix/server") console.log("Requesting file " + fname); + if (anyComponentHidden(fname) || !fs.existsSync(fname)) { res.status(404).send("That file does not exist."); return; |