mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 12:31:33 +01:00
fix: #7274 incorrect handling of client script 404s
This commit is contained in:
@@ -9,7 +9,7 @@ var plugins = require('../plugins');
|
|||||||
|
|
||||||
exports.handle404 = function handle404(req, res) {
|
exports.handle404 = function handle404(req, res) {
|
||||||
var relativePath = nconf.get('relative_path');
|
var relativePath = nconf.get('relative_path');
|
||||||
var isClientScript = new RegExp('^' + relativePath + '\\/assets\\/src\\/.+\\.js$');
|
var isClientScript = new RegExp('^' + relativePath + '\\/assets\\/src\\/.+\\.js(\\?v=\\w+)?$');
|
||||||
|
|
||||||
if (plugins.hasListeners('action:meta.override404')) {
|
if (plugins.hasListeners('action:meta.override404')) {
|
||||||
return plugins.fireHook('action:meta.override404', {
|
return plugins.fireHook('action:meta.override404', {
|
||||||
|
|||||||
Reference in New Issue
Block a user