mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-19 02:50:53 +01:00
handle extensions
This commit is contained in:
@@ -72,7 +72,10 @@ Errors.log404 = function (route) {
|
||||
route = route.slice(0, 512).replace(/\/$/, ''); // remove trailing slashes
|
||||
|
||||
const segments = route.split('/');
|
||||
const containsUUID = segments.some(segment => validator.isUUID(segment));
|
||||
const containsUUID = segments.some((segment) => {
|
||||
const cleanSegment = segment.split('.')[0];
|
||||
return validator.isUUID(cleanSegment);
|
||||
});
|
||||
if (containsUUID) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user