/install cors-tester
cors-tester
Test, debug, and generate CORS configurations from the command line.
Quick Start
# Test CORS headers on a URL
python3 scripts/cors_tester.py test https://api.example.com/data --origin https://myapp.com
# Test preflight (OPTIONS) request
python3 scripts/cors_tester.py preflight https://api.example.com/data --origin https://myapp.com --method POST --header "Content-Type"
# Generate CORS config for a framework
python3 scripts/cors_tester.py config --framework nginx --origins "https://myapp.com,https://staging.myapp.com" --methods "GET,POST,PUT,DELETE"
# Audit CORS security
python3 scripts/cors_tester.py audit https://api.example.com/data
Commands
test
Send a request with an Origin header and inspect the CORS response headers.
python3 scripts/cors_tester.py test \x3Curl> --origin \x3Corigin> [--method GET]
Options:
--origin \x3Curl>— Origin to test (required)--method \x3Cmethod>— HTTP method (default: GET)--verbose— Show all response headers
Output shows:
Access-Control-Allow-Origin— Whether the origin is allowedAccess-Control-Allow-Credentials— Whether credentials are supportedAccess-Control-Expose-Headers— Which headers are exposed
preflight
Send an OPTIONS preflight request to test if a cross-origin request would be allowed.
python3 scripts/cors_tester.py preflight \x3Curl> --origin \x3Corigin> [--method POST] [--header Content-Type]
Options:
--origin \x3Curl>— Origin to test (required)--method \x3Cmethod>— Method to request (default: POST)--header \x3Cname>— Custom header to request (repeatable)
Output shows:
Access-Control-Allow-Methods— Allowed methodsAccess-Control-Allow-Headers— Allowed headersAccess-Control-Max-Age— Preflight cache duration
audit
Check a URL for common CORS misconfigurations and security issues.
python3 scripts/cors_tester.py audit \x3Curl>
Checks for:
- Wildcard origin (
*) with credentials - Origin reflection (server echoes any origin back)
- Missing
Vary: Originheader - Overly permissive allowed methods
- Missing preflight cache (
Access-Control-Max-Age)
config
Generate CORS configuration snippets for common frameworks.
python3 scripts/cors_tester.py config --framework \x3Cname> --origins \x3Corigins> [--methods \x3Cmethods>] [--headers \x3Cheaders>] [--credentials]
Options:
--framework \x3Cname>— Target:nginx,apache,express,flask,fastapi,rails--origins \x3Ccsv>— Comma-separated allowed origins--methods \x3Ccsv>— Comma-separated methods (default:GET,POST,OPTIONS)--headers \x3Ccsv>— Comma-separated allowed headers (default:Content-Type,Authorization)--credentials— Allow credentials--max-age \x3Cseconds>— Preflight cache (default: 86400)
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install cors-tester - After installation, invoke the skill by name or use
/cors-tester - Provide required inputs per the skill's parameter spec and get structured output
What is CORS Tester?
Test and debug CORS (Cross-Origin Resource Sharing) configurations on live URLs. Use when checking if a server returns correct CORS headers, debugging CORS e... It is an AI Agent Skill for Claude Code / OpenClaw, with 213 downloads so far.
How do I install CORS Tester?
Run "/install cors-tester" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is CORS Tester free?
Yes, CORS Tester is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does CORS Tester support?
CORS Tester is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created CORS Tester?
It is built and maintained by John Wang (@johnnywang2001); the current version is v1.0.0.