
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
restify-links
Advanced tools
Middleware that adds the res.links function from Express to Restify responses objects.
Middleware that adds the res.links function from Express to Restify responses objects.
Join the given links to populate the "Link" response header field.
res.links({
next: 'http://api.example.com/users?page=2',
last: 'http://api.example.com/users?page=5'
});
yields:
Link: <http://api.example.com/users?page=2>; rel="next",
<http://api.example.com/users?page=5>; rel="last"
This library also works for link definition objects and arrays, allowing one to construct significantly more complex and descriptive link relations. You can mix and match as needed, plus keep adding to the list of links.
res.links({
next: "http://api.example.com/users?page=2",
self: "http://api.example.com/users",
search: "http://api.example.com/users{?username,firstname,lastname}"
});
res.links({
last: "http://api.example.com/users?page=5",
stylesheet: {
href: "http://static.example.com/ss.css",
type: "text/css"
},
up: [
"http://api.example.com/"
],
service: [
{
href: "https://api.example.com/auth",
method: "post",
profile: "/schemas/auth",
title: "auth"
}
]
});
results in:
Link: <http://api.example.com/users>; rel="self",
<http://api.example.com/users?page=2>; rel="next",
<http://api.example.com/users{?username,firstname,lastname}>; rel="search",
<http://api.example.com/users?page=5>; rel="last",
<http://static.example.com/ss.css>; rel="stylesheet"; type="text/css",
<http://api.example.com/>; rel="up",
<https://api.example.com/auth>; rel="service"; method="post"; profile="/schemas/auth"; title="auth"
This greatly assists with working with REST level 3 (Hypermedia) APIs and making the resources self-describing. In fact, the link definition objects are compatible with JSON Schema for Hypermedia and HAL Link Objects. It can use the link-extension
part of the Web Linking specification.
FAQs
Middleware that adds the res.links function from Express to Restify responses objects.
The npm package restify-links receives a total of 6 weekly downloads. As such, restify-links popularity was classified as not popular.
We found that restify-links demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.