Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

PUBLIC / surfer-okd

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 4d8f08f9 authored 6 years ago by Johannes Zellner's avatar Johannes Zellner
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

Corretly send 404 status codes

1 parent 459517d3
Show whitespace changes
Inline Side-by-side
Showing with 3 additions and 1 deletions
  • CHANGELOG
  • server.js
CHANGELOG
View file @4d8f08f
......@@ -75,3 +75,5 @@
[5.4.0]
* Use new Cloudron base image
* Send 404 status code correctly
This diff is collapsed. Click to expand it.
server.js
View file @4d8f08f
......@@ -93,7 +93,7 @@ app.use('/', function welcomePage(req, res, next) {
});
app.use('/', function (req, res, next) {
if (config.folderListingEnabled) return next();
res.sendFile(__dirname + '/frontend/404.html');
res.status(404).sendFile(__dirname + '/frontend/404.html');
});
app.use('/', serveIndex(ROOT_FOLDER, { icons: true }));
app.use(lastMile());
......
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
  • Please register or sign in to post a comment