mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 01:11:12 -05:00
Fix pathname scope in ssrOG.ts
This commit is contained in:
@@ -220,10 +220,12 @@ function injectOGTags(html: string, ogTags: string): string {
|
||||
}
|
||||
|
||||
export default async function handler(req: VercelRequest, res: VercelResponse): Promise<void> {
|
||||
let pathname = '/';
|
||||
|
||||
try {
|
||||
const userAgent = req.headers['user-agent'] || '';
|
||||
const fullUrl = `https://${req.headers.host}${req.url}`;
|
||||
const pathname = new URL(fullUrl).pathname;
|
||||
pathname = new URL(fullUrl).pathname;
|
||||
|
||||
// Comprehensive bot detection with headers
|
||||
const botDetection = detectBot(userAgent, req.headers as Record<string, string | string[] | undefined>);
|
||||
|
||||
Reference in New Issue
Block a user