/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-context-access-insi-13462583ab34-context-access-inside-middleware-arguments-s0117-c0000.md

Context access inside Middleware arguments - hono-docs

Context access inside Middleware arguments Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt contex...

Context access inside Middleware arguments

Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#context-access-inside-middleware-arguments

Summary

To access the context inside middleware arguments, directly use the context parameter provided by app.use. See the example below for clarification. ```ts import { cors } from 'hono/cors' app.use('*', async (c, next) => { const middlewa...

Content

To access the context inside middleware arguments, directly use the context parameter provided by app.use. See the example below for clarification.

import { cors } from 'hono/cors'

app.use('*', async (c, next) => {
  const middleware = cors({
    origin: c.env.CORS_ORIGIN,
  })
  return middleware(c, next)
})
Kinic Wiki
Loading knowledge node
Details

Identity

database
db_23dhmsxlhukv
database_id
db_23dhmsxlhukv
path
/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-context-access-insi-13462583ab34-context-access-inside-middleware-arguments-s0117-c0000.md
kind
directory
role
markdown_note
children
0

Metadata

created_at
virtual
updated_at
virtual
etag
virtual
metadata_json
{}

Lint Hints

No lightweight warnings.

Outgoing Links

No outgoing links indexed.

Incoming Links

Select a file node to inspect backlinks.

Raw Source

No raw source path inferred.