Skip to content

Commit 99eb47c

Browse files
Docs: instruct deployers to set API origin for worker and OpenAPI
- wrangler.toml: comment to set FAIRFETCH_API_ORIGIN to deployer's API base URL - openapi.yaml: comment and production server description for self-hosting - PUBLISHER_GUIDE: Cloudflare step must set API origin to created API server - README: config note and openapi.yaml tree note for self-hosted API URL
1 parent 52b621e commit 99eb47c

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ fairfetch/
671671
│ └── dev_server.py # Local launcher (make dev)
672672
├── tests/ # 127 tests · 98% coverage
673673
├── .github/workflows/ # CI pipeline
674-
├── openapi.yaml # REST API spec
674+
├── openapi.yaml # REST API spec (set servers[].url to your API when self-hosting)
675675
├── mcp.json # MCP Inspector config
676676
├── pyproject.toml # Package config
677677
├── Makefile # Dev commands
@@ -682,6 +682,8 @@ fairfetch/
682682

683683
## ⚙️ Configuration
684684

685+
**Deploying your own API?** If you use the Cloudflare Worker (`deploy/cloudflare/wrangler.toml`), set `FAIRFETCH_API_ORIGIN` to your API base URL. If you use the OpenAPI spec for clients or docs, set the production `servers[].url` in `openapi.yaml` to your deployed API.
686+
685687
| Variable | Default | Description |
686688
|----------|---------|-------------|
687689
| `FAIRFETCH_TEST_MODE` | `true` | Enable mock facilitator + grants; when `false`, CORS is restricted to your domain and no test wallets are pre-seeded |

deploy/cloudflare/wrangler.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name = "fairfetch-edge"
22
main = "worker.ts"
33
compatibility_date = "2025-12-01"
44

5+
# Set FAIRFETCH_API_ORIGIN to the base URL of the Fairfetch API server you run.
6+
# The worker proxies AI-agent requests to this origin. Replace with your own (e.g. https://fairfetch.co or https://api.yoursite.com).
57
[vars]
68
FAIRFETCH_API_ORIGIN = "https://api.fairfetch.co"
79
FAIRFETCH_LLMS_TXT = "/.well-known/llms.txt"

docs/PUBLISHER_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ Choose the option that matches how your site is hosted.
288288
**Best for:** Sites already on Cloudflare.
289289

290290
1. In the Fairfetch repo, go to the folder `deploy/cloudflare`.
291-
2. Open `wrangler.toml` and set your API origin and paths. **Example:**
291+
2. Open `wrangler.toml` and set your API origin and paths. **You must set `FAIRFETCH_API_ORIGIN` to the base URL of the Fairfetch API server you have created** (the repo default may be a placeholder). **Example:**
292292

293293
```toml
294294
[vars]

openapi.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ info:
2626
name: Fairfetch
2727
url: https://github.com/Fairfetch-co/fairfetch
2828

29+
# When hosting your own instance, change the production server URL below to your deployed API base (e.g. https://your-domain.com).
2930
servers:
3031
- url: http://localhost:8402
3132
description: Local development server
3233
- url: https://api.fairfetch.co
33-
description: Production API
34+
description: Production API (replace with your API server URL when self-hosting)
3435

3536
paths:
3637
/content/fetch:

0 commit comments

Comments
 (0)