chore: remove Cloudflare Worker edition

Worker approach tested and confirmed non-functional:
- Both AniList and Miruro block CF Worker IPs (HTTP 403)
- Edge-to-edge assumption was wrong

Removed:
- worker.js (885 lines)
- README Worker section
- docs/architecture.md Worker section
- Cloudflare Worker script deleted from CF account

CHANGELOG.md kept as historical record.
This commit is contained in:
Shinei Nouzen
2026-07-02 10:01:13 +05:30
parent 4293683ae4
commit 45b436d752
3 changed files with 0 additions and 949 deletions
-51
View File
@@ -5,7 +5,6 @@
```
MiruroAPI/
├── server.js # Express entry point, port 3000
├── worker.js # Cloudflare Worker edition (edge runtime)
├── package.json # name: "miruro-api"
├── vercel.json # Routes /api/* and /* to server.js
├── Dockerfile # Docker support (node:20-alpine)
@@ -200,54 +199,4 @@ Error responses:
| cors | ^2.8.5 | CORS headers |
| dotenv | ^16.4.0 | Environment variables |
## Cloudflare Worker Architecture (v2.3.1)
The Worker edition (`worker.js`) runs the same API on Cloudflare's edge network. **⚠️ Experimental** — testing shows that both AniList and Miruro block CF Worker IPs (HTTP 403).
### Why Workers Don't Work (Current)
```
Vercel (datacenter IP) → miruro.to → Cloudflare WAF → 403 Blocked
Cloudflare Worker (edge) → miruro.to → Cloudflare bot detection → 403 Blocked
Cloudflare Worker (edge) → graphql.anilist.co → AniList blocks worker IPs → 403 Blocked
```
Cloudflare Worker IPs are recognized as automated traffic and blocked by both services.
### Worker Runtime Differences
| Feature | Express (Node.js) | Cloudflare Worker |
|---------|-------------------|-------------------|
| HTTP client | axios | native fetch |
| Decompression | zlib (Node.js) | DecompressionStream (Web API) |
| Caching | in-memory Map | Workers KV (optional) |
| npm packages | Yes | No (bundle only) |
| Cold starts | ~500ms | Zero |
| CPU limit | None | 10ms (free) / 30s (paid) |
### Worker Endpoints (15)
| Endpoint | Description |
|----------|-------------|
| `GET /api/health` | System health check |
| `GET /api/search?query=` | Full-text anime search |
| `GET /api/suggestions?query=` | Autocomplete suggestions |
| `GET /api/filter?genre=` | Advanced filter |
| `GET /api/trending` | Trending anime |
| `GET /api/popular` | Most popular |
| `GET /api/top` | Top scored |
| `GET /api/random` | Random anime |
| `GET /api/info/:id` | Full anime info |
| `GET /api/anime/:id/characters` | Characters + voice actors |
| `GET /api/anime/:id/relations` | Related anime |
| `GET /api/genres` | All genres |
| `GET /api/episodes/:id` | Episode list (pipe) |
| `GET /api/watch/:provider/:anilistId/:category/:slug` | Streaming sources (pipe) |
### Deploy (Experimental)
```bash
npm install -g wrangler
wrangler login
wrangler deploy worker.js --name miruroapi
```