-
-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next #3896
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* feat(helper/proxy): introduce proxy helper * chore(helper/proxy): expose proxy helper * test(helper/proxy): fix test name * fix(helper/proxy): return Content-Range header as it is Co-authored-by: Haochen M. Kotoi-Xie <haochenx@acm.org> * refactor(helper/proxy): return the original content-length if the response is uncompressed * feat(middleware): enable to pass `...c.req` to init options * refactor(middleware/proxy): rename `proxyFetch` to `proxy` * docs(helper/proxy): update example * docs(helper/proxy): fix typo * refactor(helper/proxy): also accept HonoRequest instance as request init * fix(helper/proxy): remove hop-by-hop headers * refactor(helper/proxy): build request init from request * fix(helper/proxy): fix type error Co-authored-by: Yusuke Wada <yusuke@kamawada.com> * test(helper/proxy): add test for modify header * fix(helper/proxy): It is generally the Set-Cookie that should be removed from the response header --------- Co-authored-by: Haochen M. Kotoi-Xie <haochenx@acm.org> Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
* feat(logger): include query param * optimize slice path
* feat(factory): Allow HonoOptions<E> with factory * refactor(factory): rename defaultOptions to defaultAppOptions
* feat(language-detector): add language detector middleware and helper function * chore(language-detector): add export in package.json * chore(language-detector): add export to jsr * feat: new parse-accept helper, add edge case tests * chore: add jsr for parse-accept * fix: export default options, remove empty type * refac: rename languageDetectorMiddleware to languageDetector * chore format code * refac: apply patches * refactor: change export type in language
* feat(hono/context): add buffer returns * test: add bun & deno tests for buffers * fix(hono/context): buffer -> uint8array for web standards --------- Co-authored-by: askorupskyy <50280805+rcbxd@users.noreply.github.com>
* Update cookie.ts * Integrated `priority` option into setCookie serialization tests * Add kid' to TokenHeader, fix Jwt.sign ignoring privateKey.alg with keyAlg fallback, add decodeHeaders utility - Added "kid" (Key ID) for TokenHeader - Fixed Jwt.sign() ignoring privateKey.alg - Renamed `alg` parameter to `KEYAlg` to differentiate between privateKey.alg - Added utility function `decodeHeaders` to decode only JWT headers * Add ./src/middleware/jwk/jwk.ts to jsr.json * Add hono/jwk to exports * feat(hono/jwk) Hono JWK Middleware main features: - Ability to provide a list of public JWKs to the keys parameter as a simple javascript array [] - Ability to provide a URL in the jwks_uri parameter to fetch keys from + an optional RequestInit (useful for caching if your cloud provider has a modified fetch that supports it, or if you simply want to modify the request) - Ability to provide an async function that returns an array to the keys parameter instead of a direct array, so that it is possible to implement own custom caching layer without a separate middleware - Allows setting a keys directory for multi-key auth systems - Allows auth endpoints to be always updated with the Auth provider's public JWKs directory (often `.well-known/jwks.json`) which makes key rotations without disruptions possible Todo: - More tests. * (feat/Jwt.verifyFromJwks) / batteries included util * Update index.ts * add JwtHeaderRequiresKid exception * using Jwt.verifyFromJwks now * improved jsdoc and formatting * jsdoc update * formatting * testing jwk's `keys` receiving an async function * removed redundancy * add 'Should authorize Keys function' test Added /auth-keys-fn/* & /.well-known/jwks.json testing endpoints to the router. * added jwks_uri test + improved test descriptions * test naming consistency * explicit return fix + moving global declaration merging to own interface * cleaner jsdoc @example * removed commented-out tests unnecessarily inflating changes * ExtendedJsonWebKey -> HonoJsonWebKey * Refactor test to use msw per @yusukebe's suggestion * removed stray log + added minor validation w/ @Code-Hex Also removed redundant "import type {} from '../..'" from 3 different files: - jwk/index.ts - jwt/index.ts - request-id/index.ts * Update index.ts * add more test coverage * more test coverage * lint & format * typo * 100/100 test coverage Note: Moved more code from `hono/jwk` to the `verifyFromJwks` function for backends that require JWK verification logic beyond just a middleware * final touch * added eslint-disable + type export
* feat(etag): allow for custom hashing methods to be used to etag * chore: add jsdoc * fix jsdoc * cleanup * fix: remove unneed code * fix arg name * fix
…s. (#3888) * feat(router): support greedy matches with subsequent static components. * feat(router): support more complex greedy matches patterns
Bundle size check
Compiler Diagnostics
Reported by octocov |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3896 +/- ##
==========================================
+ Coverage 91.41% 91.43% +0.02%
==========================================
Files 162 168 +6
Lines 10281 10750 +469
Branches 2894 3049 +155
==========================================
+ Hits 9398 9829 +431
- Misses 882 920 +38
Partials 1 1 ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
v4.7.0