Commit Graph

33 Commits

Author SHA1 Message Date
Ritesh Ghosh 1081c7b7bb fix: update ANIWATCH_API_HOSTNAME env 2025-05-12 02:37:22 +05:30
Ritesh Ghosh 36b4f8acfc refactor: rename logger to log 2025-05-11 13:31:58 +05:30
Ritesh Ghosh b6288a02d8 feat: add custom pino logger 2025-05-11 13:07:17 +05:30
Ritesh Ghosh 5e028771f0 feat: integrate use of ebvalidated envs 2025-05-11 13:07:04 +05:30
Ritesh Ghosh 5880fe3db6 feat: add envalid for better env management 2025-05-11 13:06:04 +05:30
Ritesh Ghosh 797fc2455c style: prettier format changes 2025-05-11 13:05:23 +05:30
Ritesh Ghosh f7af9c890a style: formatting changes 2025-04-15 00:11:33 +05:30
Ritesh Ghosh cb5a4672a8 fix(ts build error): fixed ts build error due to conflicting types 2025-01-01 13:42:07 +05:30
Ritesh Ghosh da19fb7e86 feat(errorHandling): add error handlers config file 2024-12-24 17:09:43 +05:30
Ritesh Ghosh 5f1f2167df feat(cache): add cacheConfigSetter & cacheControlMiddleware by #90 2024-12-24 17:07:35 +05:30
Abdelaziz Mahdy dfc278be08 chore: styling changes to be more consistent 2024-12-23 03:27:43 -04:00
Abdelaziz Mahdy f1f5db84f9 feat(cache): add Cache-Control middleware and update .env.example 2024-12-22 15:32:56 -04:00
Ritesh Ghosh 64eaa18ed9 refactor: update getOrSet method definition 2024-12-22 00:43:03 +05:30
Ritesh Ghosh b7d036dbe2 feat(cache): add AniwatchAPICache class to implement API caching layer 2024-12-07 21:12:34 +05:30
Ritesh Ghosh db022185ef feat(server): add aniwatch variables types for type-safe req context variable access 2024-12-07 21:11:44 +05:30
Ritesh Ghosh 46f688ac12 Aniwatch API Version 2 (#66)
BREAKING CHANGE:

* chore: remove files that are not necessary for api v2

* test: update existing tests to use  pkg

* feat: organized aniwatch api envs and add more info about them

* feat: update tsconfig to include strict noUnsed params

* feat(api homepage): revamp api home page

* feat: update wani kuni image

* feat: add dot img

* feat: use hono cors

* feat: use hono rate limiter

* build: remove unnecessary deps, add ones needed and update description

* feat: add hianime routes and their handlers

* feat: update vercel deployment file

* docs: update logo and scraper docs, add envs section

* feat: update main server file

* feat: update peronal deployments caution section
2024-10-06 01:13:23 +05:30
Ritesh Ghosh 21a8718f87 feat: update allowed origins to include wildcard if env not present 2024-10-04 12:24:31 +05:30
Divyansh 91fd0918c3 Enhance CORS Configuration for Production Security
📌 Removed the wildcard (*) origin and replaced it with trusted origins from .env.

📌 Introduced environment variable (CORS_ALLOWED_ORIGINS) for dynamic origin management.

📌 Improved security by blocking untrusted origins and methods.

📌 Enhanced performance with maxAge for caching preflight responses.

📌 No breaking changes, as the fallback origin is set to http://localhost:4000 for development, ensuring compatibility with local setups.
2024-10-01 04:55:14 +00:00
Ritesh Ghosh 8d82f44896 feat: update rate limit to 6 reqs every 30 mins 2024-06-11 10:37:32 +05:30
Ritesh Ghosh 870fae700b feat: add json rate limit response; replace max with limit 2024-03-12 22:54:09 +05:30
Ritesh Ghosh 4782a8dd70 feat: add axios config for future code reusability 2024-03-03 20:05:42 +05:30
Ayush Choudhary c3ee76a06b Added .env.example 2024-02-28 12:42:05 +00:00
Ritesh Ghosh 6573e8318a refactor: add strict type imports 2023-11-22 13:43:09 +05:30
Ritesh Ghosh 94dd071fe5 refactor: add strict type imports 2023-11-22 13:43:04 +05:30
Ritesh Ghosh 6e11137ce2 perf(rateLimit): increased windowMs time 2023-09-10 23:45:13 +05:30
Ritesh Ghosh f8f2883f72 feat(legacyHeaders): update ratelimit config 2023-09-10 20:15:39 +05:30
Ritesh Ghosh 6ebee632d7 feat: updated ratelimit config 2023-09-10 19:36:34 +05:30
Ritesh Ghosh eff3f3408b feat(cors): added cors config 2023-08-20 13:34:43 +05:30
Ritesh Ghosh 5f6fe546ef refactor(env): removed env type config 2023-08-13 19:27:14 +05:30
Ritesh Ghosh 3014ab8ce4 feat: added rate limit config 2023-08-07 20:42:17 +05:30
Ritesh Ghosh 96348cd999 refactor: added notFoundHandler 2023-08-07 14:50:37 +05:30
Ritesh Ghosh c543ab83fb refactor: added errorHandler 2023-08-07 14:50:18 +05:30
Ritesh Ghosh b44b31c216 chore(envs): added type safe envs 2023-08-07 14:46:56 +05:30