33 Commits (b16378e39bb56957b89b00bbcb6ccc7675a12831)

Author SHA1 Message Date
Luke Childs 4a64b9df50 Only add ? to url if we have a query string 8 years ago
Luke Childs 290e877f90 Account for current age in cache calculations 8 years ago
Luke Childs 14f5d7534c [].indexOf() > -1 -> [].includes() 8 years ago
Luke Childs b052076359 Refactor caching to be all in the same place 8 years ago
Luke Childs 703b2e7bb3 Make sure got doesn't throw 304s 8 years ago
Luke Childs f8d73163eb Send If-Modified-Since header for stale cache entries 8 years ago
Luke Childs 155f078905 Refactor expire function to return expirey date rather than time in ms 8 years ago
Luke Childs 88191ef716 Don't set a ttl on cache entries 8 years ago
Luke Childs 98cbfa3bec args -> options 8 years ago
Luke Childs a17b03cf46 Refactor createEndpointMethod to not be wrapped in a promise 8 years ago
Luke Childs a29cde357c Only parse JSON on successfull requests 8 years ago
Luke Childs edef446641 calculateResponseMaxAge only needs headers as arg 8 years ago
Luke Childs 883e269848 Reformat response to have more useful data 8 years ago
Luke Childs b6c63d1a38 Set user agent correctly 8 years ago
Luke Childs 6ae31e6845 Calculate max age more reliably 8 years ago
Luke Childs 38b6ee5c7d checkResponseMaxAge -> calculateResponseMaxAge 8 years ago
Luke Childs 4f6a1bc11a standard code style 8 years ago
Luke Childs be667010f0 Swap out node-cache for cache-manager 8 years ago
Luke Childs 2509f77fad Allow cache option to disable cache 8 years ago
Luke Childs f05cf3f0d4 Only set cache if it's undefined 8 years ago
Luke Childs 183f5f177b Refactor into class 8 years ago
Luke Childs aaccdbd716 checkResponseCache -> checkResponseMaxAge 8 years ago
Luke Childs 8653006d38 Add comments 8 years ago
Luke Childs 5f3b425ff9 Move main logic out of reduce callback 8 years ago
Luke Childs 45a99b019a Make sure all occurances of ':' are escaped in queries 8 years ago
Luke Childs 52c562c4c1 Add custom user agent 9 years ago
Luke Childs 4f84a1ce50 Don't encode ':' so search filters work 9 years ago
Luke Childs 8cc1ab21c6 Swap out request for got 9 years ago
Luke Childs ec23474326 Accept gzip 9 years ago
Luke Childs 14ed37aca9 Cache responses 9 years ago
Luke Childs 0db9e263d6 Add better error reporting 9 years ago
Luke Childs b17dbbe162 Implement promise support ourself 9 years ago
Luke Childs b246f9eed3 Import onionoo client from https://github.com/lukechilds/tor-explorer 9 years ago