Skip to content
Myr

conninfo.ts

This file

Path

src/adapter/lambda-edge/conninfo.ts

18 lines · 486 bytes · TypeScript

Last changed by

feat(adapters): add the seven adapters as workspace packages (#5463)Yusuke Wadabefore adoptionb877827

History of this file

Take it

The walk stopped after 200 commits: lines older than f0b094d point at it.

Merge commit from forkYusuke Wadabefore adoptionf0b094d

lines 1–10why, one step back
1import type { Context } from '../../context'
2import type { GetConnInfo } from '../../helper/conninfo'3import type { CloudFrontEdgeEvent } from './handler'45type Env = {6 Bindings: {7 event: CloudFrontEdgeEvent8 }9}10

feat(adapters): add the seven adapters as workspace packages (#5463)Yusuke Wadabefore adoptionb877827

lines 11–13why, one step back
11/**
12 * @deprecated `hono/lambda-edge` will be removed in v5. Install `@hono/lambda-edge` and import from there instead.13 */

Merge commit from forkYusuke Wadabefore adoptionf0b094d

lines 14–18why, one step back
14export const getConnInfo: GetConnInfo = (c: Context<Env>) => ({
15 remote: {16 address: c.env.event.Records[0].cf.request.clientIp,17 },18})