Taku Amano
8eb20215a5
feat(cors): Enable to check origin header by a function. ( #533 )
2022-09-16 20:59:27 +09:00
Taku Amano
bbb95585d4
Check in Origin header instead of Referer ( #532 )
...
* refactor(cors): Check in Origin header instead of Referer.
* refactor(utils/url): Remove unused function getDomainFromURL.
* chore: denoify
2022-09-16 07:23:31 +09:00
Yusuke Wada
df64870f54
feat(cors): allow multiple origins ( #531 )
...
* feat(validator): add `isBoolean` and `isNumber`
* feat(cors): allow multiple origins
Close #503
2022-09-16 00:19:02 +09:00
Yusuke Wada
9c9e1c2356
feat(validator): add isBoolean
and isNumber
( #530 )
2022-09-16 00:10:37 +09:00
Yusuke Wada
62e3292460
feat(validator): add isFalsy
and isNotFalsy
( #523 )
2022-09-14 08:30:46 +09:00
Yusuke Wada
e2d704fd4f
fix(types): add types to middleware correctly ( #521 )
2022-09-14 08:17:20 +09:00
Yusuke Wada
46c6a8de5e
feat(middleware): introduce "built-in" Validator Middleware ( #505 )
...
* feat(middleware): introduce built-in Validator Middleware
* fixed type of `req.json()`
* Feat/builtin validator middleware another idea (#508 )
* Enable overwriting of query/header data.
* Returns only verified data.
* rename `index.test.ts` to `middleware.test.ts`
* add `removeAdditional` option
* handling error that the JSON body is null
* tidy
* check is it string or not
* implement `isIn`
* enable validation the valies are duplicate
Co-authored-by: Taku Amano <taku@taaas.jp>
2022-09-13 07:54:06 +09:00
Yusuke Wada
3697e156ed
fix(middleware): support multiple middleware on bearer/basic auth middleware ( #513 )
...
Fix #509
2022-09-10 18:02:36 +09:00
Yusuke Wada
24a28942de
fix: fixed the issue logger called twice ( #494 )
...
* fix: fixed the issue logger called twice
* add handling the error and shorten code
2022-09-02 21:13:47 +09:00
Yusuke Wada
1c3c9f1200
fix(type): fix type errors for Bindings and Variables ( #488 )
2022-08-27 23:57:33 +09:00
Yusuke Wada
7345b8105d
fix(ETag): fixed an error when the file size is too large. ( #461 )
...
Made `utils/crypto` supports `ReadbleStream`.
Fix #458
2022-08-09 10:35:30 +09:00
Yusuke Wada
9f2a270c28
refactor(utils/html
): rename Buffer
to StringBuffer
( #449 )
2022-08-03 11:24:51 +09:00
Yusuke Wada
3c371d0d07
chore: denoify
2022-07-31 22:19:28 +09:00
Yusuke Wada
115395766e
fix(jsx/bun): do not escape children ( #422 )
...
For JSX middleware on Bun.
Fix bug that JSX `children` will force escaped.
2022-07-24 20:39:41 +09:00
Yusuke Wada
5f60a18227
feat(jsx): support jsxImportSource
( #420 )
...
* feat(jsx): support `jsxImportSource`
Support `jsxImportSource`.
You can use this option on Bun and Deno (Wrangler does not support it).
if you write tsconfig as below, JSX middleware will be enabled without `import { jsx } from 'hono/jsx'`.
```json
{
"compilerOptions": {
"jsx": "react-jsx",
"jsxFragmentFactory": "Fragment",
"jsxImportSource": "hono/jsx"
}
}
```
* fix export path
2022-07-24 17:36:37 +09:00
Yusuke Wada
c450c56460
feat(middleware): implement Cache Middleware ( #417 )
...
* feat(middleware): implement Cache Middleware
* denoify
* do not export Cache middleware for Deno.
2022-07-23 15:02:42 +09:00
Yusuke Wada
b4a660c605
chore(deno): denoify
2022-07-18 11:56:07 +09:00
Yusuke Wada
da4d9a5491
fix(logger): specify console.log
for default print fn ( #401 )
2022-07-18 08:17:42 +09:00
Yusuke Wada
1ee08cc5ce
chore(deno): denoify
2022-07-17 18:11:09 +09:00
Yusuke Wada
be548c97ed
fix(compress): add type for enconding name ( #396 )
2022-07-17 08:59:40 +09:00
Yusuke Wada
230d265429
chore(deno): denoify
2022-07-16 10:26:14 +09:00
Yusuke Wada
af9f6a73d9
[BREAKING] feat: remove "graphql-server" middleware, will be obsolete ( #366 )
...
It might be *third-party middleware*.
Close #357
2022-07-15 08:40:15 +09:00
Yusuke Wada
16adde746b
refactor: denoify
2022-07-15 08:40:15 +09:00
Yusuke Wada
9a41cde632
chore: denoify
2022-07-15 08:40:15 +09:00
Yusuke Wada
0d48c9f338
feat: [WIP] new structure for support Deno and third-party middleware
...
[skip ci]
2022-07-15 08:40:15 +09:00
Yusuke Wada
b07486b965
chore(deno): denoify
2022-07-15 08:38:09 +09:00
Yusuke Wada
3f5c725435
chore: denoify
2022-07-10 18:52:04 +09:00
Yusuke Wada
dbb3ec213b
chore: update deno_dist files
2022-07-02 23:22:51 +09:00
Yusuke Wada
6030c051db
chore: rm *.ts.test
from deno_dist ( #338 )
2022-07-02 22:31:10 +09:00
Yusuke Wada
d9e9e62e47
feat: support Deno! ( #336 )
2022-07-02 15:09:45 +09:00