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

feat(secureHeader): add Permissions-Policy header to secure headers middleware #3314

Merged
merged 2 commits into from
Sep 8, 2024

Conversation

kbkn3
Copy link
Contributor

@kbkn3 kbkn3 commented Aug 23, 2024

…iddleware

Summary

Permissions-Policy was added to Secure Headers Middleware.
For more information on Permissions-Policy, please refer to the following.

EN: Permissions-Policy | MDN Web Docs
EN: Permissions Policy - HTTP | MDN

JA: Permissions-Policy - HTTP | MDN
JA: Permissions Policy - HTTP | MDN

Documetn Policy, which is listed as a similar Header, is not a Security requirement and does not need to be addressed.

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

Copy link

codecov bot commented Aug 28, 2024

Codecov Report

Attention: Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.77%. Comparing base (d1c7f6f) to head (00b9d70).
Report is 22 commits behind head on next.

Files with missing lines Patch % Lines
src/middleware/secure-headers/secure-headers.ts 96.15% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #3314      +/-   ##
==========================================
- Coverage   96.31%   95.77%   -0.54%     
==========================================
  Files         151      153       +2     
  Lines       15368     9214    -6154     
  Branches     2693     2828     +135     
==========================================
- Hits        14801     8825    -5976     
+ Misses        567      389     -178     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yusukebe yusukebe changed the title feat(secureHeader): add Permissions-Policy header to secure headers m… feat(secureHeader): add Permissions-Policy header to secure headers middleware Aug 28, 2024
@yusukebe
Copy link
Member

Hi @kbkn3 Thank you for the PR!

@watany-dev Can you review this?

@yusukebe
Copy link
Member

yusukebe commented Sep 4, 2024

@watany-dev Thank you for reviewing.

@kbkn3 Can you take a look?

@kbkn3
Copy link
Contributor Author

kbkn3 commented Sep 4, 2024

@watany-dev Thank you for reviewing.

@yusukebe Sorry for the delay in response. Fixed.

@yusukebe
Copy link
Member

yusukebe commented Sep 5, 2024

@watany-dev Thank you for reviewing!!

@kbkn3 Last one thing. Can you run bun run format:fix && bun run lint:fix to format the code?

@kbkn3 kbkn3 force-pushed the secureHeader-permissionsPolicy branch from 87eac2b to 00b9d70 Compare September 5, 2024 07:11
@kbkn3
Copy link
Contributor Author

kbkn3 commented Sep 5, 2024

@yusukebe
My apologies.
One line was left blank.
I have formatted it. Please check it!

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.

LGTM!

@yusukebe
Copy link
Member

yusukebe commented Sep 5, 2024

@kbkn3

Thank you! Let's go with it. This is a new feature so that it will be included in the next new minor version, v4.6.0. I'll later merge this PR to the next branch for the new version. Appreciate your first contribution!

@kbkn3
Copy link
Contributor Author

kbkn3 commented Sep 5, 2024

@yusukebe
Thank you for your time.

I enjoy developing with hono. Thanks for your great efforts.

@yusukebe yusukebe changed the base branch from main to next September 8, 2024 06:43
@yusukebe yusukebe merged commit 5a25e33 into honojs:next Sep 8, 2024
14 checks passed
@yusukebe yusukebe mentioned this pull request Sep 11, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants