Skip to content
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

fix(secure-header): Replace NodeJS Buffer API #2761

Merged
merged 2 commits into from
May 22, 2024

Conversation

watany-dev
Copy link
Contributor

close: #2725

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun denoify to generate files for Deno
  • bun run format:fix && bun run lint:fix to format the code

@usualoma
Copy link
Member

Thank you so much!

@@ -1,5 +1,6 @@
import type { Context } from '../../context'
import type { MiddlewareHandler } from '../../types'
import { bufferToBase64 } from '../../utils/buffer'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use encodeBase64!

import { encodeBase64 } from '../../utils/encode'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok!

@yusukebe
Copy link
Member

Hi @watany-dev !

Sorry! I intended to fix it, but thanks for your help. I've left a comment.

@watany-dev
Copy link
Contributor Author

Sorry for fixing it on my own, I chose the right API.

@watany-dev watany-dev requested a review from yusukebe May 22, 2024 08:46
Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@yusukebe
Copy link
Member

Thanks! Merging now.

@yusukebe yusukebe merged commit de88993 into honojs:main May 22, 2024
10 checks passed
@watany-dev watany-dev deleted the helmet-buffer-purge branch May 22, 2024 09:45
nicolewhite referenced this pull request in autoblocksai/cli May 29, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [hono](https://hono.dev/) ([source](https://togithub.com/honojs/hono))
| [`4.3.8` ->
`4.4.0`](https://renovatebot.com/diffs/npm/hono/4.3.8/4.4.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/hono/4.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/hono/4.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/hono/4.3.8/4.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/hono/4.3.8/4.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>honojs/hono (hono)</summary>

###
[`v4.4.0`](https://togithub.com/honojs/hono/compare/v4.3.11...v4.4.0)

[Compare
Source](https://togithub.com/honojs/hono/compare/v4.3.11...v4.4.0)

### [`v4.3.11`](https://togithub.com/honojs/hono/releases/tag/v4.3.11)

[Compare
Source](https://togithub.com/honojs/hono/compare/v4.3.10...v4.3.11)

#### What's Changed

- fix(middleware/jwt): fix incorrect assumption in jwt impl by
[@&#8203;boehs](https://togithub.com/boehs) in
[https://github.com/honojs/hono/pull/2775](https://togithub.com/honojs/hono/pull/2775)

#### New Contributors

- [@&#8203;boehs](https://togithub.com/boehs) made their first
contribution in
[https://github.com/honojs/hono/pull/2775](https://togithub.com/honojs/hono/pull/2775)

**Full Changelog**:
honojs/hono@v4.3.10...v4.3.11

### [`v4.3.10`](https://togithub.com/honojs/hono/releases/tag/v4.3.10)

[Compare
Source](https://togithub.com/honojs/hono/compare/v4.3.9...v4.3.10)

#### What's Changed

- fix(secure-header): Replace NodeJS Buffer API by
[@&#8203;watany-dev](https://togithub.com/watany-dev) in
[https://github.com/honojs/hono/pull/2761](https://togithub.com/honojs/hono/pull/2761)
- fix(http-exception): prioritize the status code by
[@&#8203;yusukebe](https://togithub.com/yusukebe) in
[https://github.com/honojs/hono/pull/2767](https://togithub.com/honojs/hono/pull/2767)
- feat(etag): export `RETAINED_304_HEADERS` by
[@&#8203;yusukebe](https://togithub.com/yusukebe) in
[https://github.com/honojs/hono/pull/2763](https://togithub.com/honojs/hono/pull/2763)

**Full Changelog**:
honojs/hono@v4.3.9...v4.3.10

### [`v4.3.9`](https://togithub.com/honojs/hono/releases/tag/v4.3.9)

[Compare
Source](https://togithub.com/honojs/hono/compare/v4.3.8...v4.3.9)

#### What's Changed

- fix(factory): export `CreateHandlersInterface` by
[@&#8203;yusukebe](https://togithub.com/yusukebe) in
[https://github.com/honojs/hono/pull/2752](https://togithub.com/honojs/hono/pull/2752)
- feat(aws-lambda): add support for alb multiValueQueryStringParameters
by [@&#8203;yiss](https://togithub.com/yiss) in
[https://github.com/honojs/hono/pull/2751](https://togithub.com/honojs/hono/pull/2751)

**Full Changelog**:
honojs/hono@v4.3.8...v4.3.9

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone
America/Chicago, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/autoblocksai/cli).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generated nonce for secure headers middleware uses NodeJS Buffer API
3 participants