Web Framework built on Web Standards
This release fixes "Restricted Directory Traversal in serveStatic with deno".
Full Changelog: https://github.com/honojs/hono/compare/v4.2.6...v4.2.7
$ws
when not used WebSockets by @nakasyou in https://github.com/honojs/hono/pull/2532
Full Changelog: https://github.com/honojs/hono/compare/v4.2.5...v4.2.6
Full Changelog: https://github.com/honojs/hono/compare/v4.2.4...v4.2.5
typ
Field Optional to Enhance Compatibility by @naporin0624 in https://github.com/honojs/hono/pull/2488
baseUrl
for testClient
by @yusukebe in https://github.com/honojs/hono/pull/2496
OutputTypeExcludeResponseType
when InputType
is unknown by @nagasawaryoya in https://github.com/honojs/hono/pull/2500
Full Changelog: https://github.com/honojs/hono/compare/v4.2.3...v4.2.4
package.json
correctly by @yusukebe in https://github.com/honojs/hono/pull/2483
Full Changelog: https://github.com/honojs/hono/compare/v4.2.2...v4.2.3
null
correctly by @yusukebe in https://github.com/honojs/hono/pull/2469
Full Changelog: https://github.com/honojs/hono/compare/v4.2.1...v4.2.2
Full Changelog: https://github.com/honojs/hono/compare/v4.2.0...v4.2.1
Hono v4.2.0 is now available! Let's take a look at the new features.
The number of algorithms that JWT util can handle has increased from only 3 to 13! This means that JWT util now implements many of the algorithms supported by JWT.
You can use these algorithms from the JWT middleware or JWT helpers. Thanks @Code-Hex!
Method Override Middleware has been added. This middleware override the method of the real request with the specified method.
HTML form
does not allow you to send a DELETE method request. Instead, by sending an input with name
as _method
and a value of DELETE
, you can call the handler registered in app.delete()
.
const app = new Hono()
// If no options are specified, the value of `_method` in the form,
// e.g. DELETE, is used as the method.
app.use('/posts', methodOverride({ app }))
app.delete('/posts', (c) => {
// ....
})
Trailing Slash Middleware resolves the handling of Trailing Slashes in GET requests. You can use appendTrailingSlash
and trimTrailingSlash
functions.
For example, it redirects a GET request to /about/me
to /about/me/
.
import { Hono } from 'hono'
import { appendTrailingSlash } from 'hono/trailing-slash'
const app = new Hono({ strict: true })
app.use(appendTrailingSlash())
app.get('/about/me/', (c) => c.text('With Trailing Slash'))
Thanks @rnmeow!
extensionMap
https://github.com/honojs/hono/pull/2382
userId
hook https://github.com/honojs/hono/pull/2389
payload
https://github.com/honojs/hono/pull/2424
options.origin
function https://github.com/honojs/hono/pull/2436
vary
header option https://github.com/honojs/hono/pull/2426
cause
option https://github.com/honojs/hono/pull/2224
NO_COLOR
https://github.com/honojs/hono/pull/2228
JwtTokenInvalid
object as cause
when JWT is invalid https://github.com/honojs/hono/pull/2448
verifyToken
option https://github.com/honojs/hono/pull/2449
verifyUser
option https://github.com/honojs/hono/pull/2450
extentionMap
by @watany-dev in https://github.com/honojs/hono/pull/2382
payload
by @nakasyou in https://github.com/honojs/hono/pull/2424
vary
header in cache middleware by @naporin0624 in https://github.com/honojs/hono/pull/2426
crypto
if not exist by @yusukebe in https://github.com/honojs/hono/pull/2445
alg
option value by @yusukebe in https://github.com/honojs/hono/pull/2446
;
by @yusukebe in https://github.com/honojs/hono/pull/2447
JwtTokenInvalid
object as cause
when JWT is invalid by @yusukebe in https://github.com/honojs/hono/pull/2448
verifyToken
option by @yusukebe in https://github.com/honojs/hono/pull/2449
verifyUser
option by @yusukebe in https://github.com/honojs/hono/pull/2450
Full Changelog: https://github.com/honojs/hono/compare/v4.1.7...v4.2.0
This is a pre-release.
globalThis.caches
by @yusukebe in https://github.com/honojs/hono/pull/2444
Full Changelog: https://github.com/honojs/hono/compare/v4.1.6...v4.1.7