Closed Ardnived closed 4 years ago
Implements #25
In this PR a few things are implemented
rack-cors
rack-attack
AccessKey
key
GET
HEAD
OPTIONS
I've also fixed the Rubocop configuration, so you might start seeing a lot of style warnings around that need to be corrected.
Implements #25
In this PR a few things are implemented
rack-cors
gem to set CORS headersrack-attack
gem to throttle excessive requestsAccessKey
model will stores a labeled API key.key
parameter and return an error json if none is found, or if the provided one doesn't match any key on record.GET
,HEAD
, andOPTIONS
requests are not checked for an API key, but still subject to throttling.I've also fixed the Rubocop configuration, so you might start seeing a lot of style warnings around that need to be corrected.