Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
http-constants-ts
Advanced tools
Http Constants for mime-types, headers, tracking-statuses, methods, content-encodings, csp, response codes and cache-control instructions
Provides standard and common non-standard http headers, mime-types, methods, content codings, response statuses, CSP directives and sources, cache-control instructions and tracking statuses.
All headers are capitalized, hence Access-Control-Request-Method
All mime-types are lowercase, hence video/mpeg
All content codings are lowercase, hence deflate
All methods are uppercase, hence POST
All response codes are integer numbers, hence 404
All Cache-Control instructions are lowercase, hence min-fresh
All CSP directives and sources are lowercase, hence unsafe-eval
Key names constructed from uppercase values, -
, +
and .
substituted with _
, hence
Headers.STRICT_TRANSPORT_SECURITY //Strict-Transport-Security
MimeTypes.Application.XOP_XML //application/xop+xml
MimeTypes.Model.X3D_VRML //model/x3d+vrml
ContentEncodings.X_GZIP //x-gzip
MimeTypes.Image.VND_WAP_WBMP //image/vnd.wap.wbmp
ResponseCodes.I_AM_A_TEAPOT //418
CacheControls.MAX_AGE //max-age
CSPS.UNSAFE_EVAL //unsafe-eval
Install local
npm install http-headers-ts --save
Available at the moment
No additional dependencies for production.
Issues? Feel free to add a bug or create a PR.
Best regards iDschepe
Thanks to / forked from https://bitbucket.org/sypachev_s_s/http-headers-js
FAQs
Http Constants for mime-types, headers, tracking-statuses, methods, content-encodings, csp, response codes and cache-control instructions
The npm package http-constants-ts receives a total of 383 weekly downloads. As such, http-constants-ts popularity was classified as not popular.
We found that http-constants-ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.