Skip to content

Commit 6c44ddc

Browse files
committed
fix: add longitude, latitude, and timezone to RequestData.geo
1 parent e67c3d2 commit 6c44ddc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/runtime/src/templates/edge/runtime.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ export interface RequestData {
1818
city?: string
1919
country?: string
2020
region?: string
21-
latitude?: string
22-
longitude?: string
21+
latitude?: number
22+
longitude?: number
23+
timezone?: string
2324
}
2425
headers: Record<string, string>
2526
ip?: string
@@ -67,6 +68,9 @@ const handler = async (req: Request, context: Context) => {
6768
country: context.geo.country?.code,
6869
region: context.geo.subdivision?.code,
6970
city: context.geo.city,
71+
longitude: context.geo.longitude,
72+
latitude: context.geo.latitude,
73+
timezone: context.geo.timezone,
7074
}
7175

7276
const requestId = req.headers.get('x-nf-request-id')

0 commit comments

Comments
 (0)