Prerequisites
Fastify version
4.17.0
Plugin version
8.0.0
Node.js version
20.2.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
22.04.2
Description
It seems the value of the Retry-After header is expressed in milliseconds instead of seconds (or an http-date) as specified by RFC 9110.
Steps to Reproduce
@fastify/rate-limit options:
const options = {
max: 5,
timeWindow: '1 minute',
};
Headers on 429 response:
x-ratelimit-limit: 5
x-ratelimit-remaining: 0
x-ratelimit-reset: 58
retry-after: 60000
Expected Behavior
The value of Retry-After should be 60 (i.e., 1 minute in seconds), not 60000.
Prerequisites
Fastify version
4.17.0
Plugin version
8.0.0
Node.js version
20.2.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
22.04.2
Description
It seems the value of the Retry-After header is expressed in milliseconds instead of seconds (or an http-date) as specified by RFC 9110.
Steps to Reproduce
@fastify/rate-limitoptions:Headers on 429 response:
Expected Behavior
The value of
Retry-Aftershould be60(i.e., 1 minute in seconds), not60000.