Installations
npm install hapi-vary-accept
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
18.17.1
NPM Version
9.6.7
Score
62.1
Supply Chain
96.2
Quality
75.6
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (93.84%)
Shell (6.16%)
Developer
Download Statistics
Total Downloads
19,894
Last Day
1
Last Week
6
Last Month
52
Last Year
2,326
GitHub Statistics
1 Stars
1,426 Commits
3 Watching
3 Branches
4 Contributors
Bundle Size
2.03 kB
Minified
1.02 kB
Minified + Gzipped
Package Meta Information
Latest Version
3.0.3
Package Id
hapi-vary-accept@3.0.3
Unpacked Size
12.02 kB
Size
5.25 kB
File Count
14
NPM Version
9.6.7
Node Version
18.17.1
Publised On
23 Sept 2023
Total Downloads
Cumulative downloads
Total Downloads
19,894
Last day
0%
1
Compared to previous day
Last week
-80%
6
Compared to previous week
Last month
-7.1%
52
Compared to previous month
Last year
-1.6%
2,326
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
hapi-vary-accept
hapi pre-response handler to include Accept
in the Vary
header
Table of Contents
Motivation
Google Chrome caches only the last response for any endpoint, regardless of
content-type
, which results in rendering json data instead of the rendered
page based on the html representation. These values are cached even with the
Cache-Control
header set to no-cache
in order to optimize operations like
navigating back or duplicating a tab.
While normally unnecessary because of configuring the headers to prevent
caching,including Accept
in the Vary
header does technically further inform
a client that a single endpoint responds with different responses based on the
Accept
header of the request.
- https://bugs.chromium.org/p/chromium/issues/detail?id=94369
- https://bugs.chromium.org/p/chromium/issues/detail?id=108425
- https://stackoverflow.com/questions/1975416/what-is-the-function-of-the-vary-accept-http-header
Usage
Installation
:warning: This plugin does not yet support hapi v17
1$ npm install hapi-vary-accept --save
Contribution
Verification
1$ npm test
No vulnerabilities found.
Reason
30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
all dependencies are pinned
Details
- Info: 2 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 1 out of 1 third-party GitHubAction dependencies pinned
Reason
GitHub workflow tokens follow principle of least privilege
Details
- Warn: jobLevel 'contents' permission set to 'write': .github/workflows/node-ci.yml:32
- Warn: jobLevel 'contents' permission set to 'write': .github/workflows/release.yml:11
- Info: topLevel 'contents' permission set to 'read': .github/workflows/node-ci.yml:40
- Info: topLevel 'contents' permission set to 'read': .github/workflows/release.yml:7
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 existing vulnerabilities detected
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/travi/.github/SECURITY.md:1
- Info: Found linked content: github.com/travi/.github/SECURITY.md:1
- Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy
- Info: Found text in security policy: github.com/travi/.github/SECURITY.md:1
Reason
Found 0/18 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 25 are checked with a SAST tool
Score
6.5
/10
Last Scanned on 2025-01-06
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More