forked from cory/tildefriends
js: Move the global 404 response to C.
This commit is contained in:
@ -1177,13 +1177,6 @@ loadSettings()
|
||||
return blobHandler(request, response, match[1], match[2]);
|
||||
} else if ((match = /^(.*)(\/(?:save|delete)?)$/.exec(request.uri))) {
|
||||
return blobHandler(request, response, match[1], match[2]);
|
||||
} else {
|
||||
let data = 'File not found.';
|
||||
response.writeHead(404, {
|
||||
'Content-Type': 'text/plain; charset=utf-8',
|
||||
'Content-Length': data.length.toString(),
|
||||
});
|
||||
return response.end(data);
|
||||
}
|
||||
});
|
||||
let port = httpd.start(tildefriends.http_port);
|
||||
|
Reference in New Issue
Block a user