mirror of
https://github.com/Shineii86/AniKotoAPI.git
synced 2026-10-22 10:55:10 +00:00
feat: add creator info middleware from MiruroAPI
- Add src/middleware/creatorInfo.js (ESM adapted) - Injects creator attribution (name, GitHub, Telegram, timestamp) into every JSON response - Updates server.js to use addCreatorInfo middleware - Updates CHANGELOG.md, README.md, and docs/architecture.md
This commit is contained in:
+13
-1
@@ -84,6 +84,9 @@ AniKotoAPI/
|
||||
│ ├── mirror.helper.js # Multi-mirror fallback (5 domains)
|
||||
│ └── extractPages.helper.js # Page fetching with mirror fallback
|
||||
│
|
||||
│ └── middleware/
|
||||
│ └── creatorInfo.js # Creator attribution injection
|
||||
│
|
||||
├── test.js # Test suite (27 tests)
|
||||
├── agents/ # AI agent prompts (6 agents)
|
||||
└── CHANGELOG.md # Version history
|
||||
@@ -100,6 +103,7 @@ AniKotoAPI/
|
||||
| Caching | LRU cache with configurable TTL |
|
||||
| Compression | gzip (level 6, 1024 byte threshold) |
|
||||
| Mirror Fallback | 5 mirror domains with health checks |
|
||||
| Middleware | Creator info attribution injection |
|
||||
| Static Files | Express static middleware |
|
||||
|
||||
## Request Flow
|
||||
@@ -109,6 +113,14 @@ Client Request
|
||||
↓
|
||||
Vercel Routes (/api/* → server.js)
|
||||
↓
|
||||
Express Middleware
|
||||
↓
|
||||
├── CORS
|
||||
├── Security Headers
|
||||
├── Compression (gzip)
|
||||
├── Rate Limiting
|
||||
├── Creator Info Injection
|
||||
↓
|
||||
Express Router (apiRoutes.js)
|
||||
↓
|
||||
Controller (e.g., search.controller.js)
|
||||
@@ -119,7 +131,7 @@ HTTP Request to anikototv.to (with headers)
|
||||
↓
|
||||
Cheerio parses HTML response
|
||||
↓
|
||||
Returns structured JSON
|
||||
Returns structured JSON with Creator Attribution
|
||||
↓
|
||||
Client Response
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user