HomeCORS Tester

CORS Tester

Online CORS tester for cross-origin request checks, response header analysis, preflight diagnostics, and server config generation

This tool sends requests directly from your browser to the target URL to inspect CORS policy and response headers.

CORS Request Test

Result

Enter URL and click "Test CORS" to start.

CORS Config Generator

Config Snippet

const http = require('http')

http.createServer((req, res) => {
  res.setHeader('Access-Control-Allow-Origin', 'https://example.com')
  res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS')
  res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization')
  
  
  res.setHeader('Access-Control-Max-Age', '3600')

  if (req.method === 'OPTIONS') {
    res.writeHead(204)
    res.end()
    return
  }

  res.writeHead(200)
  res.end('OK')
}).listen(3000)


Documentation

What is CORS Tester

This tool checks cross-origin behavior of target endpoints, supporting custom methods, headers, body payloads, and diagnostic output.

Key Features

  • Test CORS with multiple HTTP methods.
  • Customize request headers and body.
  • Inspect returned CORS response headers.
  • Provide diagnostics and reference config code.

Steps

  1. Enter target URL and request settings.
  2. Run test and review status result.
  3. Inspect CORS headers and diagnostics.
  4. Adjust server-side CORS rules accordingly.

FAQ

Why can request succeed but CORS still fail?

Reachability does not imply CORS permission. Access-Control-Allow-* values must match origin, method, and headers.

What usually causes preflight failure?

Missing allowed headers/methods, or incorrect handling of OPTIONS requests on the server.