fix(server): properly handle HEAD requests to SSR paths (#23788)

pull/23794/head
David Wolff 2025-11-11 13:47:11 +07:00 committed by GitHub
parent 2f40f5aad8
commit 0b3633db4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

@ -65,9 +65,10 @@ export class ApiService {
}
return async (request: Request, res: Response, next: NextFunction) => {
const method = request.method.toLowerCase();
if (
request.url.startsWith('/api') ||
request.method.toLowerCase() !== 'get' ||
(method !== 'get' && method !== 'head') ||
excludePaths.some((item) => request.url.startsWith(item))
) {
return next();