Skip to content

Geo data missing in middleware #2880

@cshawaus

Description

@cshawaus

After upgrading to Next.js v15, I noticed the geo property on NextRequest was missing, which was fine because Vercel removed it from the interface.

However, I assume the object should still be injected into the request object via the edge function context. This assumption is based on:

const geo: RequestData['geo'] = {
city,
country: country?.code,
region: subdivision?.code,
latitude: latitude?.toString(),
longitude: longitude?.toString(),
timezone,
}

It returns null when accessing the geo property, like Next.js v14. That makes me believe that something within Next.js was removed to support this, but given that this plugin should reinstate it, I'm perplexed about the intended use.

Any thoughts would be much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions