feat: Recover servers-api Worker from Cloudflare dashboard — now in git

This commit is contained in:
Claude
2026-04-15 07:11:47 +00:00
parent b0b69fb172
commit 2cfda0fb2b
3 changed files with 118 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
# servers-api Cloudflare Worker
Proxies Pterodactyl server status to the Firefrost website with CORS support.
## What it does
- Fetches all servers from Pterodactyl Panel API
- Returns online/offline status and player counts
- Handles CORS for firefrostgaming.com
## Environment Variables (set in Cloudflare dashboard)
- `PANEL_URL` — https://panel.firefrostgaming.com
- `CLIENT_API_KEY` — Pterodactyl client API key
## Deploy
```bash
wrangler deploy --name servers-api
```
Or via API:
```bash
curl -X PUT "https://api.cloudflare.com/client/v4/accounts/b253db7a7ff86b35307206dac9476c89/workers/scripts/servers-api" \
-H "Authorization: Bearer cfat_PIavSCe5FFNwv3Iu38phwlMz6634QXeXWRIJgtfh91a42940" \
-F "index.js=@src/index.js;type=application/javascript+module"
```
## Recovered
Recovered from Cloudflare dashboard by Chronicler #91 on April 15, 2026.
Previously only existed in the dashboard — never in git (known gap).