![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
limitd-client
Advanced tools
limitd is a simple daemon for rate limiting highly available applications.
This repository contains the client library for node.js.
npm install limitd-client --save
var LimitdClient = require('limitd-client');
var limitd = new LimitdClient('limitd://localhost:9001');
//express middleware
app.use(function (req, res, next) {
limitd.take('user', req.username, function (err, resp) {
if (err) return next(err);
res.set({
'X-RateLimit-Limit': resp.limit,
'X-RateLimit-Remaining': resp.remaining,
'X-RateLimit-Reset': resp.reset
});
if (resp.conformant) return next();
// The 429 status code indicates that the user has sent too many
// requests in a given amount of time ("rate limiting").
res.send('429');
});
})
Take if available count
amount of tokens from the bucket with key key
of type type
.
count defaults to 1.
The callback will be call either with an Error object or a Response object.
response.conformant
: boolean indicating if the traffic is conformant or not.response.limit
: indicates the size of this bucket.response.remaining
: the amount of remaining tokens in the bucket.response.reset
: a unix timestamp indicating when the bucket is going to be full again.response.delayed
: always false for TAKE requests.Take or Wait for count
amount of tokens from the bucket with key key
of type type
.
count defaults to 1.
The callback will be call either with an Error object or a Response object.
response.delayed
: boolean indicating if this request was delayed due to insufficient tokens in the bucket.response.limit
: indicates the size of this bucket.response.remaining
: the amount of remaining tokens in the bucket.response.reset
: a unix timestamp indicating when the bucket is going to be full again.response.conformant
: always true for WAIT requests.Force put count
amount of tokens in the bucket with key key
of type type
.
count defaults to the size of the bucket.
The callback will be call either with an Error object or a Response object.
response.limit
: indicates the size of this bucket.response.remaining
: the amount of remaining tokens in the bucket.response.reset
: a unix timestamp indicating when the bucket is going to be full again.This is useful for buckets that are not automatically filled or when the application needs to force a reset.
MIT 2015 - AUTH0 INC.
FAQs
limitd client for node.js
The npm package limitd-client receives a total of 416 weekly downloads. As such, limitd-client popularity was classified as not popular.
We found that limitd-client 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.