8000 worldmonitor/docs/api-proxies.mdx at main · amoghkini/worldmonitor · GitHub
[go: up one dir, main page]

Skip to content
{"props":{"color_mode":"dark","logged_in":false,"marketing_page":false,"home_path":"/","login_path":"/login?return_to=https%3A%2F%2FgitHub.com%2Famoghkini%2Fworldmonitor%2Fblob%2Fmain%2Fdocs%2Fapi-proxies.mdx","signup_path":"/signup?ref_cta=Sign+up\u0026ref_loc=header+logged+out\u0026ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fblob%2Fshow\u0026source=header-repo\u0026source_repo=amoghkini%2Fworldmonitor","signup_enabled":true,"is_signup_controller":false,"show_search_and_nav":true,"hide_search":false,"private_mode_enabled":false,"should_use_dotcom_links":true,"auth_hydro_click":"{\"event_type\":\"authentication.click\",\"payload\":{\"location_in_page\":\"site header menu\",\"repository_id\":null,\"auth_type\":\"SIGN_UP\",\"originating_url\":\"https://gitHub.com/amoghkini/worldmonitor/blob/main/docs/api-proxies.mdx\",\"user_id\":null}}","auth_hydro_click_hmac":"c40ec858e0d1735c43b244659fc716d9d7acca3b85d589a572798f274aa8dabc"}}

Latest commit

 

History

History
58 lines (38 loc) · 3.45 KB

api-proxies.mdx

File metadata and controls

58 lines (38 loc) · 3.45 KB
title Proxies & Raw-Data Passthroughs
description Thin server-side proxies for upstream APIs — used by the dashboard to avoid CORS, hide credentials, and add rate-limiting and edge caching.

These endpoints pass caller requests through to an upstream data source. They exist to:

  1. Hide upstream API keys server-side
  2. Work around CORS
  3. Add caching + per-IP rate limiting
  4. Normalize response shapes
Most proxies are intended for **our own dashboard** and are lightly gated. They are not part of the public API contract and may change or be removed without notice. Prefer the domain RPC services (`/api//v1/*`) for stable integrations.

Raw-data passthroughs

GET /api/supply-chain/hormuz-tracker
Endpoint Upstream Purpose
GET /api/polymarket Polymarket gamma-api Active event contracts.
GET /api/gpsjam gpsjam.org GPS interference hotspot reports.
GET /api/oref-alerts OREF (Israel Home Front Command) Tzeva Adom rocket alert mirror.
Internal AIS + registry Real-time Hormuz transit dashboard data.

All proxies:

  • Respect the origin CORS allowlist.
  • Apply per-IP rate limits via api/_rate-limit.js or server/_shared/rate-limit.ts (600 req/min/IP default) where the handler opts in, with stricter per-route budgets declared in ENDPOINT_RATE_POLICIES — see Rate Limits. Rate limiting is per-route, not platform-wide: /api/polymarket opts in, while /api/gpsjam and /api/oref-alerts are currently unmetered.
  • Cache aggressively (s-maxage varies by upstream).

Content proxies

GET /api/rss-proxy?url=<allowed-feed>

Fetches an RSS/Atom feed and returns the parsed JSON. The URL must match one of the patterns in _rss-allowed-domains.js — arbitrary URLs are refused to prevent SSRF.

The route is API-key gated. Responses use Cache-Control: private, max-age=180 and omit CDN-Cache-Control, because shared caches do not key on the credential header. Browser clients may still reuse the body for three minutes.

Skills registry

POST /api/skills/fetch-agentskills

Fetches a single agentskills.io skill definition — pass either url or id in the JSON body — and returns its name, description, and instructions, truncated to 2,000 characters. Only the three agentskills.io hosts are accepted and redirects are refused, so the route cannot be used to reach an arbitrary host. Used by the settings skill importer. Limited to 30 req/min/IP; a successful lookup is cached in Redis for one hour.

Legacy / internal

GET|POST /api/mcp-proxy

Pro-gated outbound MCP proxy: forwards MCP traffic to a caller-supplied third-party MCP server with SSRF protection (private/link-local targets are refused) and its own 30 requests/minute/IP limit. It does not forward to WorldMonitor's own /api/mcp — call that directly.

Use GET ?serverUrl=... for tool discovery without custom headers. Query-string headers are rejected with 400. For authenticated upstream discovery, send a JSON POST body:

{ "action": "tools/list", "serverUrl": "https://mcp.example.com/mcp", "customHeaders": { "Authorization": "Bearer YOUR_UPSTREAM_KEY" } }

The response remains { "tools": [...] }. Existing POST tool calls with serverUrl, toolName, toolArgs, and optional customHeaders remain supported. Proxy errors use bounded messages owned by WorldMonitor; raw upstream error text is not returned.

0