mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-05 05:25:49 +01:00
fixed error where client side script loader on admin page was throwing 404
errors on require.js require
This commit is contained in:
@@ -138,7 +138,7 @@ var express = require('express'),
|
|||||||
app.use(function (req, res, next) {
|
app.use(function (req, res, next) {
|
||||||
res.status(404);
|
res.status(404);
|
||||||
|
|
||||||
if (path.dirname(req.url) === '/src/forum') {
|
if (path.dirname(req.url).slice(0, 10) === '/src/forum') {
|
||||||
// Handle missing client-side scripts
|
// Handle missing client-side scripts
|
||||||
res.type('text/javascript').send(200, '');
|
res.type('text/javascript').send(200, '');
|
||||||
} else if (req.accepts('html')) {
|
} else if (req.accepts('html')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user