feat: 在ALLOWED_PATHS中添加'qrcode'路径
This commit is contained in:
@@ -229,7 +229,7 @@ async function handleMainRequest(req, res) {
|
|||||||
reqPath = 'app'; // Default to 'app' if only one path segment is provided
|
reqPath = 'app'; // Default to 'app' if only one path segment is provided
|
||||||
}
|
}
|
||||||
|
|
||||||
const ALLOWED_PATHS = ['avatar', 'go', 'bbs', 'www', 'url', 'thumb', 'app'];
|
const ALLOWED_PATHS = ['avatar', 'go', 'bbs', 'www', 'url', 'thumb', 'app', 'qrcode'];
|
||||||
if (!ALLOWED_PATHS.includes(reqPath) || !token) {
|
if (!ALLOWED_PATHS.includes(reqPath) || !token) {
|
||||||
return sendErrorResponse(res, HTTP_STATUS.BAD_REQUEST, `Bad Request: Invalid path or missing token.`);
|
return sendErrorResponse(res, HTTP_STATUS.BAD_REQUEST, `Bad Request: Invalid path or missing token.`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user