Fixed handling of unknown routes
This commit is contained in:
parent
ffd12aa758
commit
ff599f7893
2
index.js
2
index.js
@ -24,7 +24,7 @@ const handleResponse = (profileURLs, req, res) => {
|
|||||||
|
|
||||||
server.use(restify.plugins.queryParser());
|
server.use(restify.plugins.queryParser());
|
||||||
|
|
||||||
server.get(/(\/|\/index.html)$/, function(req, res) {
|
server.get(/^(\/|\/index.html)$/, function(req, res) {
|
||||||
fs.readFile(`${__dirname}/README.md`, { encoding: 'utf8' }, (err, data) => {
|
fs.readFile(`${__dirname}/README.md`, { encoding: 'utf8' }, (err, data) => {
|
||||||
return res.sendRaw(`
|
return res.sendRaw(`
|
||||||
<html>
|
<html>
|
||||||
|
Loading…
Reference in New Issue
Block a user