Skip to content

fix: add longitude, latitude, and timezone to RequestData.geo #1777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 18, 2022
13 changes: 3 additions & 10 deletions packages/next/src/middleware/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@ import type { NextRequest as InternalNextRequest } from 'next/server'
import { MiddlewareResponse } from './response'

export type NextRequest = InternalNextRequest & {
get geo():
| {
city?: string
country?: string
region?: string
latitude?: string
longitude?: string
timezone?: string
}
| undefined
get geo(): {
timezone?: string
}
}

export interface NextOptions {
Expand Down