ENGLISH·COURSE API
    Preparing search index...
    • The proxy's session check: sends a request for a personal route that carries no session cookie to sign-in, with the route as next.

      Parameters

      • request: NextRequest

        The incoming request

      Returns NextResponse<unknown> | undefined

      A redirect to sign-in, or undefined to let the request through

      Optimistic by design — it only looks for the cookie, it does not validate it. Every personal page verifies the session again on the server (requireLearnerSession), which is the check that actually protects data. A path without a locale prefix is left alone: next-intl redirects it to a localized path first, and that request comes back through here.