0
0
mirror of https://github.com/honojs/hono.git synced 2024-12-01 11:51:01 +01:00
hono/deno_dist/middleware/powered-by/index.ts
Yusuke Wada 8f5ba57d0c
fix(middleware): don't use headers.append(), use headers.set() (#1129)
* fix(middleware): don't use `c.res.headers.append()`, use `set()`

* denoify
2023-05-24 18:01:19 +09:00

9 lines
208 B
TypeScript

import type { MiddlewareHandler } from '../../types.ts'
export const poweredBy = (): MiddlewareHandler => {
return async (c, next) => {
await next()
c.res.headers.set('X-Powered-By', 'Hono')
}
}