mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +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
|
||||
app.use(function (req, res, next) {
|
||||
var isLanguage = new RegExp("^" + nconf.get('relative_path') + "/language/[\\w]{2,}/.*.json"),
|
||||
isClientScript = /^\/src\/forum\/[\w]+\.js/;
|
||||
var isLanguage = new RegExp('^' + nconf.get('relative_path') + '/language/[\\w]{2,}/.*.json'),
|
||||
isClientScript = new RegExp('^' + nconf.get('relative_path') + '\\/src\\/forum(\\/admin)?\\/[\\w]+\\.js');
|
||||
|
||||
res.status(404);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user