Routing Requests
EdgeWrap acts as a transparent proxy between your clients and your origin API. Once configured, clients send requests to your EdgeWrap URL instead of directly to your origin — everything else works exactly the same.
Your Edge URL
When you create a project, EdgeWrap assigns a unique URL to it. This is the URL your clients should use.
# Your EdgeWrap URL format:
https://{project-slug}-{project-id}.edgewrap.pro
# Example:
https://payment-api-01jxyz.edgewrap.proSending Requests
Replace your origin URL with your EdgeWrap URL. Add the x-api-key header. Everything else — path, method, body, other headers — is forwarded to your origin unchanged.
❌ Before (direct to origin)
curl https://api.yourcompany.com/v1/orders \
-H "Authorization: Bearer user_jwt"✅ After (via EdgeWrap)
curl https://payment-api-01jxyz.edgewrap.pro/v1/orders \
-H "x-api-key: ek_live_xxxx" \
-H "Authorization: Bearer user_jwt"Authorization) are forwarded to your origin unchanged. EdgeWrap only reads the x-api-key header — it strips it before forwarding so your origin never sees it.All HTTP Methods Are Supported
EdgeWrap proxies all HTTP methods: GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD. Only GET requests are eligible for caching.
# GET
curl https://payment-api-01jxyz.edgewrap.pro/v1/orders \
-H "x-api-key: ek_live_xxxx"
# POST with body
curl -X POST https://payment-api-01jxyz.edgewrap.pro/v1/orders \
-H "x-api-key: ek_live_xxxx" \
-H "Content-Type: application/json" \
-d '{ "product_id": "prod_abc", "quantity": 2 }'
# DELETE
curl -X DELETE https://payment-api-01jxyz.edgewrap.pro/v1/orders/ord_abc \
-H "x-api-key: ek_live_xxxx"Response Headers Added by EdgeWrap
EdgeWrap adds diagnostic headers to every response. Your origin's headers are also passed through unchanged.
| Header | Example Value | Description |
|---|---|---|
| X-Cache-Status | HIT | Cache outcome (HIT, MISS, STALE, BYPASS) |
| X-Cache-Age | 42 | Seconds since response was cached |
| X-Request-ID | req_01jxyz | Unique ID for tracing this request in logs |
Headers Forwarded to Your Origin
EdgeWrap adds a few identification headers so your origin knows the real client details.
| Header | Value |
|---|---|
| X-Forwarded-For | Original client IP address |
| X-Forwarded-Host | Original Host header from the client |
| X-EdgeWrap-Project | Your project ID (prj_01jxyz) |
| X-EdgeWrap-Region | Edge region that handled the request (e.g. SIN, LAX, AMS) |
Verify Routing Is Working
Make a test request and check the response headers to confirm EdgeWrap is routing correctly.
curl -i https://payment-api-01jxyz.edgewrap.pro/v1/health \
-H "x-api-key: ek_live_xxxx"
# Expected response headers:
HTTP/2 200
X-Cache-Status: MISS
X-Request-ID: req_01jxyz
content-type: application/json
# Expected response body (from your origin):
{ "status": "ok" }