honojs/hono
 Watch   
 Star   
 Fork   
2 days ago
hono

v4.10.7

What's Changed

New Contributors

Full Changelog: https://github.com/honojs/hono/compare/v4.10.6...v4.10.7

14 days ago
hono

v4.10.6

Deperecated

bearer-auth options

The following options are deprecated and will be removed in a future version:

  • noAuthenticationHeaderMessage => use noAuthenticationHeader.message
  • invalidAuthenticationHeaderMessage => use invalidAuthenticationHeader.message
  • invalidTokenMessage => use invalidToken.message

What's Changed

New Contributors

Full Changelog: https://github.com/honojs/hono/compare/v4.10.5...v4.10.6

17 days ago
hono

v4.10.5

What's Changed

New Contributors

Full Changelog: https://github.com/honojs/hono/compare/v4.10.4...v4.10.5

29 days ago
hono

v4.10.4

What's Changed

New Contributors

Full Changelog: https://github.com/honojs/hono/compare/v4.10.3...v4.10.4

2025-10-25 01:03:19
hono

v4.10.3

Securiy Fix

A security issue in the CORS middleware has been fixed. In some cases, a request header could affect the Vary response header. Please update to the latest version if you are using the CORS middleware.

What's Changed

New Contributors

Full Changelog: https://github.com/honojs/hono/compare/v4.10.2...v4.10.3

2025-10-22 07:38:44
hono

v4.10.2

Security hardening improvement

If you are using JWT middleware, please read the following and consider applying the configuration.

Improper Authorization in Hono (JWT Audience Validation)

Hono’s JWT authentication middleware did not validate the aud (Audience) claim by default. As a result, applications using the middleware without an explicit audience check could accept tokens intended for other audiences, leading to potential cross-service access (token mix-up).

The issue is addressed by adding a new verification.aud configuration option to allow RFC 7519–compliant audience validation. This change is classified as a security hardening improvement, but the lack of validation can still be considered a vulnerability in deployments that rely on default JWT verification.

Recommended secure configuration

You can enable RFC 7519–compliant audience validation using the new verification.aud option:

import { Hono } from 'hono'
import { jwt } from 'hono/jwt'

const app = new Hono()

app.use(
  '/api/*',
  jwt({
    secret: 'my-secret',
    verification: {
      // Require this API to only accept tokens with aud = 'service-a'
      aud: 'service-a',
    },
  })
)

What's Changed

New Contributors

Full Changelog: https://github.com/honojs/hono/compare/v4.10.1...v4.10.2

2025-10-17 21:52:25
hono

v4.10.1

What's Changed

Full Changelog: https://github.com/honojs/hono/compare/v4.10.0...v4.10.1

2025-10-17 05:45:46
hono

v4.10.0

Release Notes

Hono v4.10.0 is now available!

This release brings improved TypeScript support and new utilities.

The main highlight is the enhanced middleware type definitions that solve a long-standing issue with type safety for RPC clients.

Middleware Type Improvements

Imagine the following app:

import { Hono } from 'hono'

const app = new Hono()

const routes = app.get(
  '/',
  (c) => {
    return c.json({ errorMessage: 'Error!' }, 500)
  },
  (c) => {
    return c.json({ message: 'Success!' }, 200)
  }
)

The client with RPC:

import { hc } from 'hono/client'

const client = hc<typeof routes>('/')

const res = await client.index.$get()

if (res.status === 500) {
}

if (res.status === 200) {
}

Previously, it couldn't infer the responses from middleware, so a type error was thrown.

CleanShot 2025-10-17 at 06 51 48@2x

Now the responses are correctly typed.

CleanShot 2025-10-17 at 06 54 13@2x


This was a long-standing issue and we were thinking it was super difficult to resolve it. But now come true.

Thank you for the great work @slawekkolodziej!

cloneRawRequest Utility

The new cloneRawRequest utility allows you to clone the raw Request object after it has been consumed by validators or middleware.

import { cloneRawRequest } from 'hono/request'

app.post('/api', async (c) => {
  const body = await c.req.json()

  // Clone the consumed request
  const clonedRequest = cloneRawRequest(c.req)
  await externalLibrary.process(clonedRequest)
})

Thanks @kamaal111!

New features

All changes

New Contributors

Full Changelog: https://github.com/honojs/hono/compare/v4.9.12...v4.10.0

2025-10-13 16:54:15
hono

v4.9.12

What's Changed

Full Changelog: https://github.com/honojs/hono/compare/v4.9.11...v4.9.12

2025-10-11 19:33:11
hono

v4.9.11

What's Changed

New Contributors

Full Changelog: https://github.com/honojs/hono/compare/v4.9.10...v4.9.11