Sarah Kim
This should handle the Bearer prefix. Split on space and take the second element, otherwise the JWT validation will fail with the full header value.
Using Date.now() in the key means rate limit windows drift with each request. Consider using a fixed window start timestamp from Redis instead.
Clean fix. This handles both cases correctly.