add basic logging of incoming requests
This commit is contained in:
parent
1fff807da3
commit
ec71240aa3
1 changed files with 1 additions and 0 deletions
1
sfs.js
1
sfs.js
|
@ -48,6 +48,7 @@ const is_allowed = path => allowed_paths.length === 0 || (path = normalize_path(
|
|||
|
||||
http
|
||||
.createServer(async (req, res) => {
|
||||
console.log(new Date().toISOString(), req.method, req.url);
|
||||
if (req.method !== 'GET' && req.method !== 'HEAD') {
|
||||
send_error(res, 405, 'Method Not Allowed');
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue