From 16eb0236d70ddf0fab7ca986d80649c14573c0bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CA=9C=C9=AA=C9=B4=E1=B4=87=C9=AA=20N=E1=B4=8F=E1=B4=9C?= =?UTF-8?q?=E1=B4=A2=E1=B4=87=C9=B4?= <157171073+Shineii86@users.noreply.github.com> Date: Thu, 25 Jun 2026 10:51:20 +0530 Subject: [PATCH] =?UTF-8?q?docs:=20Update=20README=20for=20v2.1.4=20?= =?UTF-8?q?=E2=80=94=20version,=20endpoints,=20env=20vars,=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 16c1273..c5e2748 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ AniList GraphQL Vercel License - Version - Endpoints + Version + Endpoints Providers

@@ -84,7 +84,7 @@ ### Why MiruroAPI? -- 🎬 **35 Endpoints** — Complete anime data coverage +- 🎬 **44 Endpoints** — Complete anime data coverage - 🔍 **Full-Text Search** — Search anime by keyword with suggestions - 🎭 **Characters & Voice Actors** — Full character data from AniList - 🎯 **Advanced Filtering** — Genre, year, season, format, sort @@ -140,7 +140,7 @@ flowchart TD - **AniList GraphQL** for rich metadata - **Miruro pipe** for streaming sources - **Smart caching** with configurable TTL -- **35 RESTful endpoints** +- **44 RESTful endpoints** - **Gzip compression** — 30-70% smaller responses - **Request logging** — method, path, status, duration - **Graceful error handling** per endpoint @@ -195,7 +195,7 @@ flowchart TD | Feature | Description | Status | |:---|:---|:---:| -| 🎬 35 API Endpoints | Complete anime data coverage | ✅ | +| 🎬 44 API Endpoints | Complete anime data coverage | ✅ | | 🔍 Full-Text Search | Keyword search with pagination | ✅ | | 💡 Search Suggestions | Fast autocomplete | ✅ | | 🎯 Advanced Filtering | Genre, year, season, format, sort | ✅ | @@ -398,7 +398,11 @@ bun dev | Variable | Default | Description | |:---|:---|:---| | `PORT` | `3000` | Server port (Express mode only) | -| `ALLOWED_ORIGINS` | `*` | Comma-separated allowed origins | +| `ALLOWED_ORIGINS` | `*` | Comma-separated allowed origins (restricts CORS in production) | +| `PIPE_OBF_KEY` | `71951034...` | Pipe response XOR obfuscation key (hex, 32 chars) | +| `PRU_PROXY_KEY` | `a54d389c...` | PRU proxy URL XOR key (hex, 32 chars) | + +> ⚠️ **Required for production:** Set `ALLOWED_ORIGINS` to restrict CORS. Set `PIPE_OBF_KEY` and `PRU_PROXY_KEY` for pipe decoding. ### Vercel Configuration @@ -490,13 +494,13 @@ console.log(resp.data); "success": true, "results": { "status": "healthy", - "version": "2.0.0", + "version": "2.1.4", "uptime": "0h 0m 34s", "uptimeSeconds": 34, "timestamp": "2026-06-09T09:55:00.884Z", "node": "v24.14.1", "memory": { "used": "13MB", "total": "15MB" }, - "endpoints": 35, + "endpoints": 44, "providers": ["kiwi","pewe","bee","bonk","bun","ally","nun","twin","cog","moo","hop","telli"] } } @@ -537,7 +541,7 @@ console.log(resp.data); "uptime": "0h 0m 34s", "requests": { "total": 156, "errors": 3, "successRate": "98.1%" }, "cache": { "size": 12, "maxSize": 100, "ttl": "1 min" }, - "endpoints": 35, + "endpoints": 44, "timestamp": "2026-06-09T09:55:00.884Z" } } @@ -1408,13 +1412,13 @@ docker run -p 3000:3000 miruroapi | Version | Date | Key Changes | |:---|:---|:---| -| **2.0.1** | 2026-06-24 | Streaming improvements — better subtitle extraction, quality fallback for providers without metadata | -| **2.0.0** | 2026-06-25 | Major upgrade — 35 endpoints, compression, streaming improvements, new features | -| **1.4.0** | 2026-06-25 | Creator attribution middleware, Vercel deployment fix, security headers | -| **1.3.0** | 2026-06-25 | Full landing page upgrade with premium design | -| **1.2.0** | 2026-06-09 | Critical response format fix, full endpoint diagnostic, 18/18 passing | -| **1.1.0** | 2026-06-09 | Swagger UI docs, OpenAPI spec, mappings field, Docker, landing page | -| **1.0.0** | 2026-06-09 | Initial release — 16 endpoints, AniList GraphQL + Miruro pipe, caching | +| **2.1.4** | 2026-06-25 | Security hardening — XOR keys to env vars, CORS restriction, input sanitization, bug fixes (multi-search, deepTranslate, getBestStream) | +| **2.1.3** | 2026-06-25 | Diagnostic sweep — tags, random, character/staff 404 fixes, pipe retry with backoff, security headers | +| **2.1.2** | 2026-06-25 | Streaming architecture — pru proxy decode, CDN CORS proxy, raw stream URLs | +| **2.1.1** | 2026-06-25 | Pipe XOR decoding fix — responses now decode correctly | +| **2.1.0** | 2026-06-25 | Provider capabilities, enriched metadata, skip times, 12 providers | +| **2.0.1** | 2026-06-24 | Streaming improvements — better subtitle extraction, quality fallback | +| **2.0.0** | 2026-06-25 | Major upgrade — 44 endpoints, compression, streaming improvements | > 📝 See [CHANGELOG.md](./CHANGELOG.md) for the full version history. @@ -1425,7 +1429,7 @@ docker run -p 3000:3000 miruroapi | Problem | Cause | Solution | |:---|:---|:---| | ❌ `npm install` fails | Node.js version too old | Upgrade to Node.js 20+ (`node -v`) | -| ❌ CORS errors | Frontend domain blocked | CORS is `*` — check browser extension | +| ❌ CORS errors | Origin not in ALLOWED_ORIGINS | Set `ALLOWED_ORIGINS` env var or use `*` for all origins | | ❌ 404 on API routes | Wrong URL format | Use `/api/` prefix, not just `/` | | ❌ Empty episodes | Provider not available | Check which providers return data for the anime | | ❌ Deploy fails on Vercel | Build error | Check `node server.js` locally first | @@ -1469,7 +1473,7 @@ Use /api/filter with query params. Combine genre, 📡 Can I use this in my frontend app?
-Yes! CORS is enabled for all origins (*). Just make fetch requests to the API endpoints. No API key needed. Example: fetch('https://mirurotvapi.vercel.app/api/search?query=naruto') +Yes! CORS is enabled for allowed origins. Set the `ALLOWED_ORIGINS` environment variable to your frontend domain(s), or use `*` for all origins. Example: fetch('https://mirurotvapi.vercel.app/api/search?query=naruto')
@@ -1507,7 +1511,7 @@ Yes! Use npm start to run the Express server on any VPS, Docker con ### ✅ Completed -- [x] 🎬 35 API endpoints covering all data +- [x] 🎬 44 API endpoints covering all data - [x] 🔍 Full-text search with pagination - [x] 💡 Search suggestions for autocomplete - [x] 🎯 Advanced filtering (genre, year, season, format, sort) @@ -1520,6 +1524,8 @@ Yes! Use npm start to run the Express server on any VPS, Docker con - [x] 🐳 Docker support - [x] 📘 Swagger UI interactive docs - [x] 📖 Comprehensive documentation with real API data +- [x] 🔒 Security hardening (XOR keys in env vars, CORS restriction, input sanitization) +- [x] 🛡️ Security headers at CDN level ---