mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-10-02 20:57:03 +00:00
Type the middleware as returning Response | NextResponse
The crawl gateway answers with a plain Fetch Response. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YafYxayh7Gqe5MWNNQMev2
This commit is contained in:
parent
071acf6fff
commit
c3c5406c70
1 changed files with 1 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ import type { NextRequest } from "next/server";
|
||||||
// This is the Next 16 "proxy" (formerly middleware) entrypoint.
|
// This is the Next 16 "proxy" (formerly middleware) entrypoint.
|
||||||
const ALLOWED_APEX = process.env.PUBLIC_DOMAIN || "logicsrc.com";
|
const ALLOWED_APEX = process.env.PUBLIC_DOMAIN || "logicsrc.com";
|
||||||
|
|
||||||
export async function proxy(request: NextRequest): Promise<NextResponse> {
|
export async function proxy(request: NextRequest): Promise<Response | NextResponse> {
|
||||||
// Crawl gateway first: AI training crawlers get 402 Payment Required (or the
|
// Crawl gateway first: AI training crawlers get 402 Payment Required (or the
|
||||||
// sales page at /crawl) unless they present a paid pass. People, Googlebot
|
// sales page at /crawl) unless they present a paid pass. People, Googlebot
|
||||||
// and retrieval crawlers fall through to everything below.
|
// and retrieval crawlers fall through to everything below.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue