mirror of
https://github.com/Amrizamaa/movix-open-source.git
synced 2026-11-19 05:10:14 +01:00
12 lines
324 B
JavaScript
12 lines
324 B
JavaScript
import { buildSocialPreviewResponse } from './_lib/socialPreview.js';
|
|
|
|
export async function onRequest(context) {
|
|
const pathname = new URL(context.request.url).pathname;
|
|
|
|
if (pathname.startsWith('/movie/') || pathname.startsWith('/tv/')) {
|
|
return context.next();
|
|
}
|
|
|
|
return buildSocialPreviewResponse(context);
|
|
}
|