mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 16:00:26 +01:00
fixed detection for admin client-side scripts
This commit is contained in:
@@ -307,8 +307,8 @@ if(nconf.get('ssl')) {
|
|||||||
|
|
||||||
// 404 catch-all
|
// 404 catch-all
|
||||||
app.use(function (req, res, next) {
|
app.use(function (req, res, next) {
|
||||||
var isLanguage = new RegExp("^" + nconf.get('relative_path') + "/language/[\\w]{2,}/.*.json"),
|
var isLanguage = new RegExp('^' + nconf.get('relative_path') + '/language/[\\w]{2,}/.*.json'),
|
||||||
isClientScript = /^\/src\/forum\/[\w]+\.js/;
|
isClientScript = new RegExp('^' + nconf.get('relative_path') + '\\/src\\/forum(\\/admin)?\\/[\\w]+\\.js');
|
||||||
|
|
||||||
res.status(404);
|
res.status(404);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user