Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
PUBLIC
/
surfer-okd
This project
Loading...
Sign in
Toggle navigation
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
Oct 15, 2018
by
Johannes Zellner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corretly send 404 status codes
1 parent
459517d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
CHANGELOG
server.js
CHANGELOG
View file @
4d8f08f
...
...
@@ -74,4 +74,6 @@
* Minor interface improvements
[5.4.0]
* Use new Cloudron base image
\ No newline at end of file
* Use new Cloudron base image
* Send 404 status code correctly
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
.
s
tatus
(
404
).
s
endFile
(
__dirname
+
'/frontend/404.html'
);
});
app
.
use
(
'/'
,
serveIndex
(
ROOT_FOLDER
,
{
icons
:
true
}));
app
.
use
(
lastMile
());
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment