Files
SnowLuma/.pnpm-store/v11/files/8f/abcddfa6a73ac379636dba2585d65cc25e8ba4ae5efb63fb28e61106997756fa01f6f1706813087f1924ac2c6a31bfe2006fda4824e5d3b4d1d7203029a89d
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

26 lines
754 B
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/adapter/netlify/conninfo.ts
/**
* Get connection information from Netlify
* @param c - Context
* @returns Connection information including remote address
* @example
* ```ts
* import { Hono } from 'hono'
* import { handle, getConnInfo } from 'hono/netlify'
*
* const app = new Hono()
*
* app.get('/', (c) => {
* const info = getConnInfo(c)
* return c.text(`Your IP: ${info.remote.address}`)
* })
*
* export default handle(app)
* ```
* @deprecated `hono/netlify` will be removed in v5. Install `@hono/netlify` and import from there instead.
*/
const getConnInfo = (c) => ({ remote: { address: c.env.context?.ip } });
//#endregion
exports.getConnInfo = getConnInfo;