Commit Graph

50 Commits

Author SHA1 Message Date
Ajay
9bcceb7e5b Fix usercounter behind cloudflare 2024-02-27 03:33:38 -05:00
Ajay
e1a607ba39 Add sb server host as response header 2023-04-07 12:47:08 -04:00
Michael C
f70a26009c add ignore clauses to tests 2023-02-20 22:22:33 -05:00
Michael C
e7a43d79ab optimize skipSegments, add eTag
- moved skipSegments parameter parsing to new file
- added oldGetVideoSponsorTimes to getSkipSegments.ts
2023-01-01 04:59:57 -05:00
Michael C
a613b68c66 add ETag to skipSegments byHash 2023-01-01 02:50:49 -05:00
Ajay
cff2325aef use keep alive in disk cache and user counter 2022-12-05 17:06:00 -05:00
Ajay
4e3753d32c Only call user counter some of the time 2022-12-05 16:47:11 -05:00
Ajay
89e122210e Remove extra hash 2022-12-04 19:54:44 -05:00
Ajay
96db571a5e Fix request rate limit option not working 2022-10-27 20:00:04 -04:00
Ajay
ccd1321d24 Allow disabling redis rate limit 2022-10-27 16:50:35 -04:00
Ajay
7007ab05e1 Handle errors from redis store in request rate limit 2022-09-22 11:12:47 -04:00
Ajay
bd7dfc63ff Add eslint rules for dealing with promises 2022-09-07 20:01:11 -04:00
Ajay
55ff3230ed Catch redis exceptions 2022-05-23 18:32:40 -04:00
Ajay
29660d998b Don't count users for options requests 2022-05-20 16:59:21 -04:00
Ajay
5b177a3e53 Prepare dockerfile for use, allow configuring via env vars 2022-05-03 22:08:44 -04:00
Ajay
8dc87da462 Back rate limit by redia and upgrade node-redis 2022-04-13 17:36:07 -04:00
Ajay
41c92da37e Upgrade express-rate-limit 2022-04-13 13:50:30 -04:00
Michael C
77de17c810 add allow-headers content-type 2022-01-06 21:31:34 -05:00
Michael C
164a9dab17 refactored nginx configs
- handle CORS within nginx
- remove allow-headers from CORS
- add custom dynamic error pages
- remove unused fastcgi
- removed OPTIONS backend
- remove previous custom errorDirective
- moved proxy directives to appropiate file
2022-01-06 18:42:48 -05:00
Michael C
a5a90e3c84 add getHashCache where applicable= 2021-11-27 02:41:34 -05:00
Michael C
a028eaa41a object-curly-spacing 2021-09-22 18:52:35 -04:00
Michael C
c779c2c19e everything to postClearCache 2021-09-22 17:50:06 -04:00
Michael C
c0b1d201ad fix non-format eslint in src/ 2021-07-12 02:12:22 -04:00
Michael C
d89b26b77d fix eslint-errors 2021-07-04 01:36:03 -04:00
Michael C
062faba8d1 remove CORS from nginx, add to express 2021-06-14 20:29:02 -04:00
Ajay Ramachandran
d3210d4e27 Move files to utils 2021-05-23 18:00:20 -04:00
Ajay Ramachandran
5c2ab9087a Use reputation when sorting segments 2021-05-23 17:54:51 -04:00
Ajay Ramachandran
194c657ba7 Clear reputation cache 2021-05-23 17:05:06 -04:00
Ajay Ramachandran
cfcb6c6b64 Add reputation system 2021-05-23 16:53:35 -04:00
Ajay Ramachandran
799aef0b65 Move redis code to middleware 2021-05-23 15:49:12 -04:00
Ajay Ramachandran
9d19c59d44 Add caching for raw videoID fetching 2021-05-23 12:03:05 -04:00
Ajay Ramachandran
60a118f391 Add object src to csp 2021-05-06 16:14:11 -04:00
Ajay Ramachandran
cd66399049 Add csp for API 2021-05-06 16:03:26 -04:00
Ajay Ramachandran
37a07ace72 Cache data for getting hash-prefix segments 2021-03-26 19:03:30 -04:00
Ajay Ramachandran
ff4af3786e Switch to postgres + promises 2021-03-01 20:40:31 -05:00
Ajay Ramachandran
01d318d902 Add redis caching for 404s 2021-02-20 21:13:46 -05:00
Ajay Ramachandran
e21ebd18a6 Don't ratelimit VIPs 2021-02-18 20:47:26 -05:00
Dainius Dauksevicius
12729b36fb fix docker build, add proper mocks to tests, remove YouTubeAPI dependency on youtube test mock, move index.ts and test.ts to /src ant /test folders 2020-10-26 19:13:30 +02:00
Dainius Daukševičius
08d27265fc migrate to typescript 2020-10-26 19:13:30 +02:00
Ajay Ramachandran
a5f5f72346 Setup different ratelimit for views and votes 2020-10-11 13:07:57 -04:00
Nanobyte
58097f0d60 Add vote rate limit 2020-10-11 16:17:17 +02:00
Ajay Ramachandran
c6afaf81e0 Properly catch user counter errors 2020-09-23 14:05:44 -04:00
Ajay Ramachandran
a053d87bd2 Catch user counter errors 2020-09-03 12:04:49 -04:00
Ajay Ramachandran
e46444f3b9 Added option to use new user counter 2020-08-30 00:22:21 -04:00
Ajay Ramachandran
ece475076e Added log colors and method name 2020-08-23 12:35:57 -04:00
Joe Dowd
226197a827 Added logger util and used in place of console log 2020-08-21 15:27:41 +01:00
Joe-Dowd
5369d48eae Added testing 2020-04-01 21:04:04 +01:00
Joe-Dowd
be6d75c1ff add mode condition to logger util 2020-03-20 20:14:30 +00:00
Joe-Dowd
9bf065e1f0 added request debug log without condition 2020-03-20 20:14:20 +00:00
Joe-Dowd
8543647cbc added youtube util and cors middleware 2020-03-20 20:14:14 +00:00