# Send CORS to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "cors",
    "name": "CORS",
    "source": "tencent",
    "type": "skill",
    "category": "安全合规",
    "sourceUrl": "https://clawhub.ai/ivangdavila/cors",
    "canonicalUrl": "https://clawhub.ai/ivangdavila/cors",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/cors",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=cors",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "cors",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-29T03:09:48.676Z",
      "expiresAt": "2026-05-06T03:09:48.676Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=cors",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=cors",
        "contentDisposition": "attachment; filename=\"cors-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "cors"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/cors"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/cors",
    "downloadUrl": "https://openagent3.xyz/downloads/cors",
    "agentUrl": "https://openagent3.xyz/skills/cors/agent",
    "manifestUrl": "https://openagent3.xyz/skills/cors/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/cors/agent.md"
  }
}
```
## Documentation

### Preflight Triggers

Any header except: Accept, Accept-Language, Content-Language, Content-Type (with restrictions)
Content-Type other than: application/x-www-form-urlencoded, multipart/form-data, text/plain
Methods: PUT, DELETE, PATCH, or any custom method
ReadableStream in request body
Event listeners on XMLHttpRequest.upload
One trigger = preflight; simple requests skip OPTIONS entirely

### Credentials Mode

Access-Control-Allow-Origin: * incompatible with credentials—must specify exact origin
Access-Control-Allow-Credentials: true required for cookies/auth headers
Fetch: credentials: 'include'; XHR: withCredentials = true
Without credentials mode, cookies not sent even to same origin for cross-origin requests

### Wildcard Limitations

* doesn't match subdomains—*.example.com is invalid, not a pattern
Can't use * with credentials—specify origin dynamically from request
Access-Control-Allow-Headers: * works in most browsers but not all—list explicitly for compatibility
Access-Control-Expose-Headers: * same issue—list headers you need to expose

### Origin Validation

Check Origin header against allowlist—don't reflect blindly (security risk)
Regex matching pitfall: example.com matches evilexample.com—anchor the pattern
null origin: sandboxed iframes, file:// URLs—usually reject, never allow as trusted
Missing Origin header: same-origin or non-browser client—handle explicitly

### Vary Header (Critical)

Always include Vary: Origin when response depends on origin—even if you allow only one
Without Vary: CDN/proxy caches response for one origin, serves to others—breaks CORS
Add Vary: Access-Control-Request-Headers, Access-Control-Request-Method for preflight caching correctness

### Exposed Headers

By default, JS can only read: Cache-Control, Content-Language, Content-Type, Expires, Last-Modified, Pragma
Custom headers invisible to JS unless listed in Access-Control-Expose-Headers
X-Request-ID, X-RateLimit-*, etc. need explicit exposure—common oversight

### Preflight Caching

Access-Control-Max-Age: 86400 caches preflight for 24h—reduces OPTIONS traffic significantly
Chrome caps at 2 hours; Firefox at 24 hours—values above are silently reduced
Cached per origin + URL + request characteristics—not globally
Set to 0 or omit during development—caching hides config changes

### Debugging

CORS error in browser = request reached server and came back—check server logs
Preflight failure: server must return 2xx with CORS headers on OPTIONS—404/500 = failure
Opaque response in fetch: mode: 'no-cors' succeeds but response is empty—usually not what you want
Network tab shows CORS errors; Console shows which header is missing

### Common Server Mistakes

Only setting CORS headers on main handler, not OPTIONS—preflight fails
Setting headers after error response—CORS headers missing on 4xx/5xx breaks error handling
Proxy stripping headers—verify headers reach client, not just that server sets them
Access-Control-Allow-Origin: "*", "https://example.com"—must be single value, not list

### Security

Don't reflect Origin header blindly—validate against allowlist first
Private Network Access: Chrome requires Access-Control-Allow-Private-Network: true for localhost access from public web
CORS doesn't prevent request from being sent—just blocks response reading; server still processes it
Sensitive endpoints: don't rely on CORS alone; use authentication + CSRF tokens
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: ivangdavila
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-29T03:09:48.676Z
- Expires at: 2026-05-06T03:09:48.676Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/cors)
- [Send to Agent page](https://openagent3.xyz/skills/cors/agent)
- [JSON manifest](https://openagent3.xyz/skills/cors/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/cors/agent.md)
- [Download page](https://openagent3.xyz/downloads/cors)