/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-usage-492647be7ffd-usage-s0135-c0000.md
Usage - hono-docs
Usage Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt usage Summary For your application running...
Usage
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#usage
Summary
For your application running on Bun, if you want to allow access only from local, you can write it as follows. Specify the rules you want to deny in the denyList and the rules you want to allow in the allowList. ```ts import { Hono }...
Content
For your application running on Bun, if you want to allow access only from local, you can write it as follows. Specify the rules you want to deny in the denyList and the rules you want to allow in the allowList.
import { Hono } from 'hono'
import { getConnInfo } from 'hono/bun'
import { ipRestriction } from 'hono/ip-restriction'
const app = new Hono()
app.use(
'*',
ipRestriction(getConnInfo, {
denyList: [],
allowList: ['127.0.0.1', '::1'],
})
)
app.get('/', (c) => c.text('Hello Hono!'))Pass the getConninfo from the ConnInfo helper appropriate for your environment as the first argument of ipRestriction. For example, for Deno, it would look like this:
import { getConnInfo } from 'hono/deno'
import { ipRestriction } from 'hono/ip-restriction'
//...
app.use(
'*',
ipRestriction(getConnInfo, {
// ...
})
)